-
Notifications
You must be signed in to change notification settings - Fork 0
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
알림 시간 설정 API 구현 #17
Merged
Merged
알림 시간 설정 API 구현 #17
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
ani2689
reviewed
Sep 19, 2024
src/main/kotlin/com/ondosee/domain/notification/domain/entity/Notification.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/ondosee/domain/notification/presentation/NotificationController.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/ondosee/domain/notification/service/NotificationServiceImpl.kt
Outdated
Show resolved
Hide resolved
ani2689
reviewed
Sep 19, 2024
src/main/kotlin/com/ondosee/common/adapter/notification/CommandNotificationAdapter.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/ondosee/domain/notification/presentation/NotificationController.kt
Outdated
Show resolved
Hide resolved
ani2689
approved these changes
Sep 19, 2024
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.
굳! 수고하셨어요~!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
알림 시간을 설정하는 API를 구현하겠습니다.
이번 API가 구현 자체는 쉬웠는데 진행하는 과정에서 바뀐 사항들이 몇 개 있습니다.. 😶
먼저는 Notification 엔티티에서 기존에는 alarmTime의 타입을 LocalDateTime으로 받고 있었는데 클라이언트와의 통신 과정 및 스케줄러 구현을 생각해보니 알림 시간은 String 타입의 XX:XX 와 같은 형식으로 받아온 뒤 스케줄러의 처리 과정에서 Date 타입을 String으로 변환해 처리하는 것이 더 간단할 것이라고 생각해 다음과 같이 alarmTime의 타입을 변경했습니다.
또 간단한 이슈로 queryPort에서 객체를 save 하는 로직을 수행하는 함수를 담고 있어 해당 함수를 이동 및 수정했습니다..!!
마지막으로는 기존에 구현한 deviceToken만을 저장하던 API를 구현한 것이 이번 알림 시간 설정 API를 구현하다 보니 굳이 이걸 따로 API로 분리해서 사용해야 하나..?? 하는 생각이 들어서 해당 API를 삭제 후 알림 설정 API에서 기존 FCM 토큰 유무에 따라 해당 토큰을 갱신하는 로직으로 대체했습니다..!!