Skip to content
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

Merged
merged 4 commits into from
Nov 21, 2023
Merged

[BE/#94] PATCH /posts/{id} API 구현 #96

merged 4 commits into from
Nov 21, 2023

Conversation

namewhat99
Copy link
Collaborator

이슈

체크리스트

  • PATCH / posts/{id} 구현

@namewhat99 namewhat99 added review code-review BE BE 관련 post-manage 게시글 관리 labels Nov 21, 2023
@namewhat99 namewhat99 self-assigned this Nov 21, 2023
Copy link
Member

@koomin1227 koomin1227 left a 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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

세세한 경우를 잘 나누어서 구현하신 것이 좋네요

Comment on lines 76 to 81
try {
await this.postRepository.update({ id: postId }, updatePostDto);
return true;
} catch {
return false;
}
Copy link
Member

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 쓰는것이 의미가 없지 않나 하는 생각이 듭니다..

@koomin1227 koomin1227 merged commit 50d983c into BE Nov 21, 2023
1 check failed
@koomin1227 koomin1227 deleted the BE-patchPost-#94 branch November 21, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE BE 관련 post-manage 게시글 관리 review code-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants