-
Notifications
You must be signed in to change notification settings - Fork 2
[BMOL-28] POST v1/oneliner 구현 #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
src/services/onelinerService.js
Outdated
return this._serviceName | ||
} | ||
|
||
async postOneliner(userId, book_id, title, authors, oneliner, color, top, left, font, font_size, bg_image_url){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter 의 validation 체크가 없네요
const result = await onelinerService.postOneliner(userId, book_id, | ||
title, | ||
authors, | ||
oneliner, | ||
color, | ||
top, | ||
left, | ||
font, | ||
font_size, | ||
bg_image_url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 함수 parameter가 많은경우 object로 묶어서 전달하는게 좋아요
const result = await onelinerService.postOneliner({userId, book_id, title, authors, oneliner, color, top, left, font, font_size, bg_image_url});
…eliner에서 parameters를 object로 변경
BMOL-27 오늘 한줄 등록 기능입니다.
Jira: https://bookmarkoneliner.atlassian.net/browse/BMOL-28
Postman API 문서: https://documenter.getpostman.com/view/24386698/2s93m8xKfC