-
Notifications
You must be signed in to change notification settings - Fork 0
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
[BE/#94] PATCH /posts/{id} API 구현 #96
Conversation
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.
전반 적으로 깔끔 하게 작성하신 것 같아 굿입니다.
|
||
const isChangingImages = 'images' in updatePostDto; // images 가 존재여부 확인 | ||
|
||
try { |
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.
세세한 경우를 잘 나누어서 구현하신 것이 좋네요
BE/src/post/post.service.ts
Outdated
try { | ||
await this.postRepository.update({ id: postId }, updatePostDto); | ||
return true; | ||
} catch { | ||
return false; | ||
} |
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.
여기에 try catch 문을 사용하셔서 결국에는 에러가 나도 위로 전파되지 않고 항상 true 또는 false를 반환하게 되는데updatePostById에 try catch 쓰는것이 의미가 없지 않나 하는 생각이 듭니다..
이슈
체크리스트