-
Notifications
You must be signed in to change notification settings - Fork 3
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] feat: 발자국 삭제 및 발자국 상태 수동 변경 구현 #460
Conversation
Test Results157 tests 157 ✅ 17s ⏱️ Results for commit 9da658d. ♻️ This comment has been updated with latest results. |
@DeleteMapping("/{footprintId}") | ||
public ResponseEntity<Void> delete( | ||
@Auth Long memberId, | ||
@PathVariable Long footprintId | ||
) { | ||
footprintCommandService.delete(memberId, footprintId); | ||
return ResponseEntity.noContent().build(); | ||
} |
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.
footprintId
를 입력받지 않고도 로그인한 memberId
로 조회할 수 있지 않을까요?
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.
최신 발자국을 삭제하는 것이 아닌 특정발자국을 삭제하는 api라 id를 받았습니다!
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.
수동삭제가 가능해져서 api가 다채로워졌네요~. 고생 많으십니다. ㅠㅠ
Footprint footprint = footprintRepository.getTopOneByMemberIdOrderByCreatedAtDesc(memberId); | ||
footprint.finishWalkingManual(); |
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.
footprint.finishWalkingManual()
과 같은 새로운 메서드를 생성하지 않고, 기존의 footprint.endWalk()
메서드에 검증 로직만 추가해서 재사용하는건 어떤가요?
|
||
public UpdateWalkStatusManualResponse updateWalkStatusManual(Long memberId) { |
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.
산책 상태를 AFTER로 변경한다는 것을 네이밍에 더 드러내는 것은 어떨까요?
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.
도도 컨디션이 좋지 않을텐데 주말에도 고생하셨습니다.
다음 주 예비군 화이팅입니다.!!
@DeleteMapping("/{footprintId}") | ||
public ResponseEntity<Void> delete( | ||
@Auth Long memberId, | ||
@PathVariable Long footprintId | ||
) { | ||
footprintCommandService.delete(memberId, footprintId); | ||
return ResponseEntity.noContent().build(); | ||
} |
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.
수동삭제가 가능해져서 api가 다채로워졌네요~. 고생 많으십니다. ㅠㅠ
if (!footprint.isCreatedBy(memberId)) { | ||
throw new FriendoglyException("본인의 발자국만 삭제 가능합니다."); | ||
} |
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.
이 부분은 인가에 관한 예외라고 생각합니다.! 상태코드로 구체화 하면 어떨까요?
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.
고생하셨어요~~
자동으로 발자국 상태 변경, 수동으로 발자국 상태 변경
이거는 같은 API로 쏴도 될 것 같은 느낌이 드네요!
자동, 수동 판단은 결국 클라이언트에서 하지 않나요??
납득 완
이번 주는 오류가 있지않은이상 빠르게 머지해야 해서 일단 merge하겠습니다! |
코멘트 왜 무시하시나요? ㅋㅋㅋ |
이슈
개발 사항