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] feat: 발자국 삭제 및 발자국 상태 수동 변경 구현 #460

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

ehtjsv2
Copy link
Contributor

@ehtjsv2 ehtjsv2 commented Aug 18, 2024

이슈

개발 사항

  • 새로운 기능
    • 산책상태 수동변경 API 구현(산책 중->산책후만 가능)
    • 발자국 삭제 기능 구현
  • 변경된 기능
    • 현재위치기반 산책 상태 자동변경 naming(uri, method) 변경

@ehtjsv2 ehtjsv2 added 🖥 backend backend ✨ feat 기능 개발 labels Aug 18, 2024
@ehtjsv2 ehtjsv2 added this to the Sprint4 milestone Aug 18, 2024
@ehtjsv2 ehtjsv2 self-assigned this Aug 18, 2024
Copy link

github-actions bot commented Aug 18, 2024

Test Results

157 tests   157 ✅  17s ⏱️
 30 suites    0 💤
 30 files      0 ❌

Results for commit 9da658d.

♻️ This comment has been updated with latest results.

Comment on lines +98 to 105
@DeleteMapping("/{footprintId}")
public ResponseEntity<Void> delete(
@Auth Long memberId,
@PathVariable Long footprintId
) {
footprintCommandService.delete(memberId, footprintId);
return ResponseEntity.noContent().build();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

footprintId 를 입력받지 않고도 로그인한 memberId 로 조회할 수 있지 않을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

최신 발자국을 삭제하는 것이 아닌 특정발자국을 삭제하는 api라 id를 받았습니다!

Copy link
Member

Choose a reason for hiding this comment

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

수동삭제가 가능해져서 api가 다채로워졌네요~. 고생 많으십니다. ㅠㅠ

Comment on lines +136 to +137
Footprint footprint = footprintRepository.getTopOneByMemberIdOrderByCreatedAtDesc(memberId);
footprint.finishWalkingManual();
Copy link
Contributor

Choose a reason for hiding this comment

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

footprint.finishWalkingManual() 과 같은 새로운 메서드를 생성하지 않고, 기존의 footprint.endWalk() 메서드에 검증 로직만 추가해서 재사용하는건 어떤가요?

Comment on lines 134 to +135

public UpdateWalkStatusManualResponse updateWalkStatusManual(Long memberId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

산책 상태를 AFTER로 변경한다는 것을 네이밍에 더 드러내는 것은 어떨까요?

Copy link
Member

@jimi567 jimi567 left a comment

Choose a reason for hiding this comment

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

도도 컨디션이 좋지 않을텐데 주말에도 고생하셨습니다.
다음 주 예비군 화이팅입니다.!!

Comment on lines +98 to 105
@DeleteMapping("/{footprintId}")
public ResponseEntity<Void> delete(
@Auth Long memberId,
@PathVariable Long footprintId
) {
footprintCommandService.delete(memberId, footprintId);
return ResponseEntity.noContent().build();
}
Copy link
Member

Choose a reason for hiding this comment

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

수동삭제가 가능해져서 api가 다채로워졌네요~. 고생 많으십니다. ㅠㅠ

Comment on lines +143 to +145
if (!footprint.isCreatedBy(memberId)) {
throw new FriendoglyException("본인의 발자국만 삭제 가능합니다.");
}
Copy link
Member

Choose a reason for hiding this comment

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

이 부분은 인가에 관한 예외라고 생각합니다.! 상태코드로 구체화 하면 어떨까요?

Copy link
Contributor

@takoyakimchi takoyakimchi left a comment

Choose a reason for hiding this comment

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

고생하셨어요~~
자동으로 발자국 상태 변경, 수동으로 발자국 상태 변경
이거는 같은 API로 쏴도 될 것 같은 느낌이 드네요!
자동, 수동 판단은 결국 클라이언트에서 하지 않나요??

납득 완

@ehtjsv2 ehtjsv2 merged commit bb9095e into develop Aug 19, 2024
3 checks passed
@ehtjsv2
Copy link
Contributor Author

ehtjsv2 commented Aug 19, 2024

이번 주는 오류가 있지않은이상 빠르게 머지해야 해서 일단 merge하겠습니다!
코멘트는 다 무시한거아니고 잘읽었습니다!!

@J-I-H-O
Copy link
Contributor

J-I-H-O commented Aug 19, 2024

코멘트 왜 무시하시나요? ㅋㅋㅋ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖥 backend backend ✨ feat 기능 개발
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants