-
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] 알림 관련 기능 구현 #82
Conversation
- 기기 등록 / 삭제 / 조회 API (DeviceController) - 디엠 알림 / 채널생성 알림 / 리뷰이모지 알림 / 채팅채널 알림 API (NotificationController)
- 기기 등록 / 삭제 / 조회 API (DeviceController) - 디엠 알림 / 채널생성 알림 / 리뷰이모지 알림 / 채팅채널 알림 API (NotificationController)
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.
👍 수고하셨습니다~! 코멘트 남겼는데 확인 후 답멘 부탁드립니다!
notification/src/main/java/org/bookwoori/notification/config/MongoConfig.java
Outdated
Show resolved
Hide resolved
notification/src/main/java/org/bookwoori/notification/config/RedisConfig.java
Show resolved
Hide resolved
notification/src/main/java/org/bookwoori/notification/controller/DeviceController.java
Outdated
Show resolved
Hide resolved
notification/src/main/java/org/bookwoori/notification/controller/DeviceController.java
Outdated
Show resolved
Hide resolved
notification/src/main/java/org/bookwoori/notification/controller/DeviceController.java
Outdated
Show resolved
Hide resolved
notification/src/main/java/org/bookwoori/notification/dto/request/ChannelMessageRequest.java
Outdated
Show resolved
Hide resolved
notification/src/main/java/org/bookwoori/notification/dto/response/DeviceResponse.java
Outdated
Show resolved
Hide resolved
notification/src/main/java/org/bookwoori/notification/exception/CustomExceptionStatus.java
Outdated
Show resolved
Hide resolved
notification/src/main/java/org/bookwoori/notification/dto/request/EmojiMessageRequest.java
Outdated
Show resolved
Hide resolved
notification/src/main/java/org/bookwoori/notification/util/MessageType.java
Show resolved
Hide resolved
notification/src/main/java/org/bookwoori/notification/controller/DeviceController.java
Outdated
Show resolved
Hide resolved
|
||
@Operation(summary = "등록 정보 조회", description = "등록 정보를 조회합니다.") | ||
@GetMapping("/{id}") | ||
public DataResponse<DeviceResponse> getDevice(@PathVariable("id") Long userId) { |
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.
❓ResponseEntity<?>와 ResponseEntity가 아닌 ResponseService를 따로 생성해서 응답하는 이유가 있는 건가요?
notification/src/main/java/org/bookwoori/notification/dto/request/ChatMessageRequest.java
Outdated
Show resolved
Hide resolved
notification/src/main/java/org/bookwoori/notification/dto/response/DeviceResponse.java
Outdated
Show resolved
Hide resolved
|
||
// Custom exception | ||
@ExceptionHandler(CustomException.class) | ||
@ResponseStatus(HttpStatus.BAD_REQUEST) |
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.
❓ExceptionAdvice는 예외 처리를 위한 GlobalExceptionHandler 역할을 하는 거 맞나요? 목적이 같다면 Core 서버 및 다른 서버에서 사용하고 있는 공통된 ErrorDto 및 GlobalExceptionHandler를 사용하면 좋을 거 같습니닷
|
||
Device newDevice = Device.register(request.getUserId(), request.getPlatform(), request.getToken()); | ||
deviceRepository.save(newDevice); | ||
} |
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.
❓Device 엔티티의 register 생성 메서드를 통해 생성해야 하는 특별한 이유가 있나요? requestDto에서 toEntity 및 builder 이용해서 생성하고 save해도 되지 않나욤
Device device = deviceRepository.findByUserId(userId) | ||
.orElseThrow(() -> new CustomException(EMPTY_DEVICE)); | ||
device.delete(); | ||
} |
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.
❓마찬가지로 Device 엔티티에 delete() 메서드를 둬야 할 이유가 있을까요? Repository에서 delete하면 되지 않나요?
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.
💬 나중에 시간이 된다면 이전에 리뷰드린 대로 Core 서버와 통일성 있는 구현으로 리팩토링하면 좋을 거 같습니닷
🛠️ 구현 기능
🎯 Resolve