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

[feat] 이벤트 삭제 기능 구현(#131) #134

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

blaxsior
Copy link
Collaborator

@blaxsior blaxsior commented Aug 22, 2024

#️⃣ 연관 이슈

📝 작업 내용

이벤트 삭제 기능을 추가했습니다. 정책은 다음과 같습니다.

  1. 이벤트가 없으면 404 예외를 반환한다.
  2. 이벤트가 있을 때는 이벤트가 시작되기 전에만 삭제할 수 있다.

@blaxsior blaxsior added the feat 기능 구현 label Aug 22, 2024
@blaxsior blaxsior self-assigned this Aug 22, 2024
Instant endTime = metadata.getEndTime();
Instant now = Instant.now();

if(startTime.isBefore(now)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

팀원들과 논의한 대로 이벤트가 진행 중이거나 완료된 경우에는 임의로 삭제할 수 없게 만들었습니다.

Copy link
Collaborator

Choose a reason for hiding this comment

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

논의 내용 신속하게 반영해주셔서 감사드립니다.

@@ -9,58 +9,60 @@
@Getter
public enum ErrorCode {
// 400 Bad Request
BAD_REQUEST(HttpStatus.BAD_REQUEST, false, "잘못된 요청입니다."),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

success 필드는 초기에 성공 / 실패의 경우 모두 사용하려고 했던 당시의 잔재로, 현재는 항상 실패하는 경우에 대한 에러 메시지만 담고 있으므로 필요하지 않습니다. 따라서 필요 없는 success 코드를 제거합니다.

Copy link
Collaborator

Choose a reason for hiding this comment

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

구현에만 집중한 나머지 커스텀 응답객체를 사용하지 않기 때문에 success 필드의 존재를 잊고 있었네요.

@win-luck win-luck self-requested a review August 22, 2024 06:09
@win-luck win-luck linked an issue Aug 22, 2024 that may be closed by this pull request
2 tasks
Copy link
Collaborator

@win-luck win-luck left a comment

Choose a reason for hiding this comment

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

고생많으셨습니다~~!

@@ -9,58 +9,60 @@
@Getter
public enum ErrorCode {
// 400 Bad Request
BAD_REQUEST(HttpStatus.BAD_REQUEST, false, "잘못된 요청입니다."),
Copy link
Collaborator

Choose a reason for hiding this comment

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

구현에만 집중한 나머지 커스텀 응답객체를 사용하지 않기 때문에 success 필드의 존재를 잊고 있었네요.

Instant endTime = metadata.getEndTime();
Instant now = Instant.now();

if(startTime.isBefore(now)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

논의 내용 신속하게 반영해주셔서 감사드립니다.

@blaxsior blaxsior merged commit 7dd36ee into dev Aug 22, 2024
1 check passed
@win-luck win-luck deleted the feature/131-admin-event-delete branch August 30, 2024 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 기능 구현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 관리자 이벤트 삭제 기능 추가(#131)
2 participants