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] 알림 관련 기능 구현 #82

Merged
merged 10 commits into from
Nov 29, 2024
Merged

[Feat] 알림 관련 기능 구현 #82

merged 10 commits into from
Nov 29, 2024

Conversation

minseoooooo
Copy link
Contributor

🛠️ 구현 기능

  • 기기 등록 / 삭제 / 조회 API (DeviceController)
  • 디엠 알림 / 채널생성 알림 / 리뷰이모지 알림 / 채팅채널 알림 API (NotificationController)

🎯 Resolve

- 기기 등록 / 삭제 / 조회 API (DeviceController)
- 디엠 알림 / 채널생성 알림 / 리뷰이모지 알림 / 채팅채널 알림 API (NotificationController)
- 기기 등록 / 삭제 / 조회 API (DeviceController)
- 디엠 알림 / 채널생성 알림 / 리뷰이모지 알림 / 채팅채널 알림 API (NotificationController)
Copy link
Member

@crHwang0822 crHwang0822 left a comment

Choose a reason for hiding this comment

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

👍 수고하셨습니다~! 코멘트 남겼는데 확인 후 답멘 부탁드립니다!


@Operation(summary = "등록 정보 조회", description = "등록 정보를 조회합니다.")
@GetMapping("/{id}")
public DataResponse<DeviceResponse> getDevice(@PathVariable("id") Long userId) {
Copy link
Contributor

@gkdudans gkdudans Nov 24, 2024

Choose a reason for hiding this comment

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

❓ResponseEntity<?>와 ResponseEntity가 아닌 ResponseService를 따로 생성해서 응답하는 이유가 있는 건가요?


// Custom exception
@ExceptionHandler(CustomException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
Copy link
Contributor

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);
}
Copy link
Contributor

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();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

❓마찬가지로 Device 엔티티에 delete() 메서드를 둬야 할 이유가 있을까요? Repository에서 delete하면 되지 않나요?

Copy link
Contributor

@gkdudans gkdudans left a comment

Choose a reason for hiding this comment

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

💬 나중에 시간이 된다면 이전에 리뷰드린 대로 Core 서버와 통일성 있는 구현으로 리팩토링하면 좋을 거 같습니닷

@gkdudans gkdudans merged commit e44a5b1 into develop Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants