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

✨ UserReport #180

Merged
merged 4 commits into from
Aug 6, 2024
Merged

✨ UserReport #180

merged 4 commits into from
Aug 6, 2024

Conversation

tackyu
Copy link

@tackyu tackyu commented Aug 5, 2024

유저 신고 기능

  • 금일 회의한 대로 신고에 따른 유저 차단 기능은 보류하였습니다.
  • 엔드포인트: /api/user/report
  • 검증 로직은 추후 추가 하겠습니다.

@tackyu tackyu added ✨ feature new feature BE Backend labels Aug 5, 2024
@tackyu tackyu self-assigned this Aug 5, 2024
Copy link

github-actions bot commented Aug 5, 2024

Overall Project 94.35% 🍏
Files changed 100% 🍏

File Coverage
UserService.java 100% 🍏
UserController.java 100% 🍏
UserReport.java 100% 🍏
UserReportResponse.java 100% 🍏
UserReportRequest.java 100% 🍏

Copy link

@oshyun00 oshyun00 left a comment

Choose a reason for hiding this comment

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

신고 저장에 필요한 부분만 간결하게 잘 작성해주신 것 같아요!
로컬에서 동작하는것도 확인했습니다 😁


private String details;

private LocalDateTime createdAt;
Copy link

Choose a reason for hiding this comment

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

(단순 의견) 저도 레시피 생성하는 과정에서 같은 방식으로 createdAt을 저장하고 있는데요, 이렇게 여러 클래스에서 createdAt을 다루게 되면 @EnableJpaAuditing 도입을 고려해봐도 좋을 것 같습니다!

Copy link
Author

Choose a reason for hiding this comment

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

옙 학습하고 리팩터링 고려하겠습니다
감사합니다!

Copy link

@HaiSeong HaiSeong left a comment

Choose a reason for hiding this comment

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

폰드 수고했슴당👍👍

@@ -77,7 +79,7 @@ void checkUsername() {
.when().get("/api/user/username/check")
.then().log().all()
.statusCode(200)
.body("available", Matchers.is(true));
.body("available", is(true));
Copy link

Choose a reason for hiding this comment

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

👍👍👍


public UserReportResponse reportUser(long reporterId, UserReportRequest userReportRequest) {
User reporter = userRepository.findById(reporterId).orElseThrow();
User reportee = userRepository.findById(userReportRequest.reporteeId()).orElseThrow();
Copy link

Choose a reason for hiding this comment

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

추후에 NotFoundException이 필요할것 같아 추가햐면 좋아보입니다!

Copy link
Author

@tackyu tackyu Aug 6, 2024

Choose a reason for hiding this comment

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

반영하였습니다!
감사합니다!

@tackyu tackyu merged commit 6f68a86 into be/dev Aug 6, 2024
1 check passed
Copy link

github-actions bot commented Aug 6, 2024

Overall Project 94.78% -0.56% 🍏
Files changed 90.8% 🍏

File Coverage
UserController.java 100% 🍏
UserReport.java 100% 🍏
UserReportRequest.java 100% 🍏
UserReportResponse.java 100% 🍏
UserService.java 88.37% -11.63% 🍏
NotFoundException.java 0% 🍏

@tackyu tackyu deleted the be/feat/149 branch August 6, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Backend ✨ feature new feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants