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

좋아요 기능의 응답 코드를 통일 #692

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

zangsu
Copy link
Contributor

@zangsu zangsu commented Sep 25, 2024

이전의 좋아요 기능 응답 코드는 다음과 같았습니다.

  • 좋아요 성공 : 200
  • 좋아요 취소 성공 : 204

200 응답은 좋아요를 하나의 동작으로 본 경우, 204 응답은 좋아요를 하나의 자원으로 본 경우라고 생각해요.
좋아요를 하나의 동작으로 본다면 200 / 200 응답이, 하나의 자원으로 본다면 201 / 204 응답이 적절할 것 같습니다.

이에 대한 논의는 아마 각자의 선호도가 달라 통일시키기 어려울 것으로 보입니다.
또한, 옳고 그름의 문제가 아닌지라 어떤 선택이든 납득이 가능하기도 해요.

그래서 헤인의 "그렇다면 예외 처리 하기 편하게 200 으로 던져줘도 될까?" 라는 요청을 고려해 200 / 200 응답으로 수정합니다.

@zangsu zangsu added refactor 요구사항이 바뀌지 않은 변경사항 BE 백엔드 labels Sep 25, 2024
@zangsu zangsu added this to the 5차 스프린트🍗 milestone Sep 25, 2024
@zangsu zangsu self-assigned this Sep 25, 2024
Copy link
Contributor

@kyum-q kyum-q left a comment

Choose a reason for hiding this comment

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

귯 ~!

Copy link
Contributor

@jminkkk jminkkk left a comment

Choose a reason for hiding this comment

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

구굿

Copy link
Contributor

@zeus6768 zeus6768 left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@HoeSeong123 HoeSeong123 left a comment

Choose a reason for hiding this comment

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

좋아요!!

@HoeSeong123 HoeSeong123 merged commit e955aa9 into dev/be Sep 26, 2024
6 checks passed
@HoeSeong123 HoeSeong123 deleted the feat/668-be-like branch September 26, 2024 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 백엔드 refactor 요구사항이 바뀌지 않은 변경사항
Projects
Status: Weekend Done
Development

Successfully merging this pull request may close these issues.

5 participants