-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨feat: 알림 삭제 구현 및 임시 fcm 토큰 발급 (#166)
* ✨ feat: 알림 삭제 기능 구현 * 🐛 fix: @PathVariable name 옵션 추가 & service 수정
- Loading branch information
Showing
6 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ Content-Type: application/json | |
{ | ||
"email": "[email protected]", | ||
"password": "password1234", | ||
"fcmToken": "fcmtokenfcmtokenfcmtokenfcmtokenfcmtokenfcmtokenfcmtokenfcmtokenfcmtokenfcmtoken" | ||
"fcmToken": "eRfQraP_WUxZuC0XFzMrSC:APA91bEDel7UnziwZHglJGukRx8nqLgaYswkO532pit7DOkFiyoA2dfEIGMO49JL_NjwbfReszwVui-8xP3Uh6UhxcverlnW5cnClSAqcEd_xhgaF8FSQ4M6WdvnPMdTGJwUbe_9gaE5" | ||
} | ||
|
||
### 학생단체 로그인 | ||
|
@@ -228,7 +228,7 @@ Authorization: Bearer {{masterToken}} | |
|
||
### 알림 테스트 | ||
POST http://localhost:8080/api/v1/notification/fcm | ||
Authorization: Bearer 림{{masterToken}} | ||
Authorization: Bearer {{masterToken}} | ||
Content-Type: application/json | ||
|
||
{ | ||
|
26 changes: 26 additions & 0 deletions
26
src/main/java/com/sponus/sponusbe/domain/notification/exception/NotificationErrorCode.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.sponus.sponusbe.domain.notification.exception; | ||
|
||
import org.springframework.http.HttpStatus; | ||
|
||
import com.sponus.sponusbe.global.common.ApiResponse; | ||
import com.sponus.sponusbe.global.common.BaseErrorCode; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum NotificationErrorCode implements BaseErrorCode { | ||
NOTIFICATION_ERROR(HttpStatus.BAD_REQUEST, "NOTI4000", "알림 관련 에러"), | ||
NOTIFICATION_NOT_FOUND(HttpStatus.NOT_FOUND, "NOTI4001", "존재하지 않는 알림입니다."), | ||
INVALID_ORGANIZATION(HttpStatus.BAD_REQUEST, "NOTI4002", "해당 단체의 알림이 아닙니다."); | ||
|
||
private final HttpStatus httpStatus; | ||
private final String code; | ||
private final String message; | ||
|
||
@Override | ||
public ApiResponse<Void> getErrorResponse() { | ||
return ApiResponse.onFailure(code, message); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/sponus/sponusbe/domain/notification/exception/NotificationException.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.sponus.sponusbe.domain.notification.exception; | ||
|
||
import com.sponus.sponusbe.global.common.BaseErrorCode; | ||
import com.sponus.sponusbe.global.common.exception.CustomException; | ||
|
||
public class NotificationException extends CustomException { | ||
|
||
public NotificationException(BaseErrorCode errorCode) { | ||
super(errorCode); | ||
} | ||
} |
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
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
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