-
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
✨ feat(notification): change memory storage -> mongoDB storage #210
Conversation
siyeonSon
commented
Jul 14, 2023
•
edited
Loading
edited
- Resolve : Change memory storage -> mongoDB storage #194
public void save(TopicPushRequestDto tokenPushRequestDto) { | ||
// TODO: 토픽 저장에 따른 스키마 변경 후 구체화 | ||
} |
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.
현재 스키마로는 UserDevice 정보에 사용자가 구독하는 topic 정보를 저장하지 않아요.
토픽 별로 사용자에게 알림을 보내는 로직 구체화 후에 스키마를 변경해야 할 것 같아요!
알림 정보를 저장하는 로직은 좋은 방법을 생각해보고, 추가 이슈로 리팩토링하겠습니다! |
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.
LGTM 😄
backend/streetdrop-notification/src/main/java/com/depromeet/service/NotificationService.java
Show resolved
Hide resolved
backend/streetdrop-notification/src/main/java/com/depromeet/service/PushService.java
Show resolved
Hide resolved
backend/streetdrop-notification/src/main/java/com/depromeet/service/TokenService.java
Show resolved
Hide resolved
backend/streetdrop-notification/src/main/java/com/depromeet/service/NotificationService.java
Show resolved
Hide resolved
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.
Good!
* ✨ feat: create UserDeviceRepository * ✨ chore: find device token by userId * ✨ chore: find all device tokens * ✨ feat: save token * ✨ feat: update token * ✨ feat: delete token * ✨ chore: combine saveToken and insertToken * ✨ chore: add Transactional annotation * ✨ chore: change TokenRepository -> UserDeviceRepository in PushService * ✨ chore: change TokenRepository -> UserDeviceRepository in TopicService * ✨ chore: delete TokenRepository and MemoryTokenRepository * ✨ chore: rename createToken -> saveToken * ✨ feat: save notification * 🐛 fix: fix Query annotation of findAllDeviceTokens * ♻️ refactor: delete UserDevice * ♻️ refactor: delete deleteToken service logic * ♻️ refactor: change findDeviceTokenByUserId -> findByUserId * ♻️ refactor: find tokens using findDeviceTokenByUserId -> findByUserId * ♻️ refactor: add transactional annotation * ♻️ refactor: extract getting tokens logic into private method * ♻️ refactor: give space * ♻️ refactor: change token not found error message * 🔥 chore: remove Param annotation * ♻️ refactor: find tokens using findByUserId -> findDeviceTokenByUserId * ♻️ refactor: change token not found error message * ♻️ refactor: remove unused import statement * ♻️ refactor: notificationList save -> saveAll