-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat/#7] ApiGatewayHandler 구현 #23
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
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
538f012
[FEAT] DeviceTokenException 추가
JungYoonShin 8323f67
[REFACTOR] 기본 생성자 롬복으로 대체
JungYoonShin 3a16f11
[FIX] DeviceTokenService 구현(토큰 등록, 유저 저장)
JungYoonShin 5298b81
[FEAT] pk 기반 디바이스 토큰 조회 추가
JungYoonShin 46ab2e7
[FIX] 추가 구현에 따른 AppFactory 수정
JungYoonShin 4f8a3ef
[FEAT] SnsFactory 구현
JungYoonShin e8d4aae
[FEAT] 토큰 등록 & 삭제 관련 DTO 구현
JungYoonShin 8384d59
[FEAT] 알림 전송 관련 DTO 구현
JungYoonShin 2ae5631
[FEAT] ApiGatewayHandler 구현
JungYoonShin 8a6563a
[FIX] template.yml 수정
JungYoonShin be09093
[MERGE] 충돌 해결
JungYoonShin 1f629b6
[MERGE] 충돌 머지
JungYoonShin baf67c2
[REFACTOR] 불필요한 파일 삭제
JungYoonShin deb22af
[REFACTOR] 코드 스타일 적용
JungYoonShin 2504a92
[REFACTOR] header 정보 상수화
JungYoonShin 1461ae9
[REFACTOR] 필요없는 파일 정리
JungYoonShin 7e9e109
[FEAT] TokenRegisterFacade 구현
JungYoonShin 09cee50
[FEAT] EnvConfig env 추가
JungYoonShin 4593796
[REFACTOR] 불필요한 코드 제거
JungYoonShin 75b9e44
[REFACTOR] ApiGatewayHandler 리팩토링
JungYoonShin 97bd0e7
[FIX] 잘못된 role 수정
JungYoonShin a46e638
[REFACTOR] spotleess 적용
JungYoonShin 29568fe
[REFACTOR] 필요없는 의존성 및 메서드 제거
JungYoonShin e68e22d
[FIX] 토큰 등록 실패 시, 토큰 삭제 실패시 성공 응답이 반환되는 문제 수정
JungYoonShin 40547b5
[REFACTOR] actualUserId 사용하도록 수정
JungYoonShin 303c72f
[FIX] AppFactory - DeviceTokenService 의존성 정리
JungYoonShin 4a52d91
[REFACTOR] validate > validateDto 메서드명 변경
JungYoonShin 976862e
[REFACTOR] InvalidEndpointCleaner & TokenRegisterFacade 통합
JungYoonShin 8dc2eb2
[REFACTOR] ApiGatewayHandler - response를 ResponseUtil로 이동
JungYoonShin 0327c5b
[REFACTOR] 토큰 관련 부분 DeviceTokenService로 이동
JungYoonShin 953518d
[REFACTOR] SNS_PROTOCOL_APPLICATION 상수화
JungYoonShin 5566389
[REFACTOR] DeviceTokenService - registerToken 메서드 삭제
JungYoonShin 75ffea2
[REFACTOR] DeviceTokenRepository에서 사용하지 않는 메서드 삭제
JungYoonShin 770d86e
[REFACTOR] 코드 포맷팅
seoyeonjin d298340
[REFACTOR] 변수명 messageFactoryDto로 수정
JungYoonShin 773c2d5
Merge branch 'feat/#7' of https://github.com/sopt-makers/sopt-push-no…
JungYoonShin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
24 changes: 24 additions & 0 deletions
24
src/main/java/com/sopt/push/common/DeviceTokenException.java
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| package com.sopt.push.common; | ||
|
|
||
| import lombok.Getter; | ||
|
|
||
| @Getter | ||
| public class DeviceTokenException extends RuntimeException { | ||
|
|
||
| private final ErrorMessage errorMessage; | ||
|
|
||
| public DeviceTokenException(ErrorMessage errorMessage) { | ||
| super(errorMessage.getMessage()); | ||
| this.errorMessage = errorMessage; | ||
| } | ||
|
|
||
| public DeviceTokenException(ErrorMessage errorMessage, String detail) { | ||
| super(errorMessage.getMessage() + ": " + detail); | ||
| this.errorMessage = errorMessage; | ||
| } | ||
|
|
||
| public DeviceTokenException(ErrorMessage errorMessage, String detail, Throwable cause) { | ||
| super(errorMessage.getMessage() + ": " + detail, cause); | ||
| this.errorMessage = errorMessage; | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package com.sopt.push.dto; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| public record ApiGatewayRequestDto(RegisterHeaderDto header, Map<String, Object> body) {} | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| package com.sopt.push.dto; | ||
|
|
||
| import com.sopt.push.enums.Actions; | ||
| import com.sopt.push.enums.Platform; | ||
| import com.sopt.push.enums.Services; | ||
|
|
||
| public record RegisterHeaderDto( | ||
| String transactionId, Services service, Platform platform, Actions action) {} |
Oops, something went wrong.
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.
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.
요기 Body는 Map으로 꼭 써야하나요? 요부분 제가 잘 몰라서..ㅎㅎ
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.
extractRequest에서 아래 액션을 확인하기 전에 body를 파싱하는데, 어떤 타입으로 변환할지 알 수가 없어서 Map<String, Object>로 받아서, 각 핸들러(handleRegister, handleCancel 등)에서 필요한 타입으로 mapper.convertValue()를 사용해서 변환하고 있습니다 !!