Skip to content

Commit

Permalink
✨ Feat : 푸쉬알람 허용 V2 구현 (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
CYY1007 authored Feb 18, 2024
1 parent 0049ee0 commit 63b3648
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,35 @@ public CommonResponse<MemberResponse.LoginDTO> loginV2(
return CommonResponse.onSuccess(memberFacade.login(socialType, request));
}

@Operation(summary = "02-04 Member\uD83D\uDC64 푸쉬 알람 허용/거부 설정 V2 ", description = "푸쉬 알람 허용/거부 설정입니다.")
@PostMapping("/members/alarms")
@ApiResponses({
@ApiResponse(responseCode = "1000", description = "OK, 성공"),
@ApiResponse(
responseCode = "AUTH003",
description = "access 토큰을 주세요!",
content = @Content(schema = @Schema(implementation = CommonResponse.class))),
@ApiResponse(
responseCode = "AUTH004",
description = "acess 토큰 만료",
content = @Content(schema = @Schema(implementation = CommonResponse.class))),
@ApiResponse(
responseCode = "AUTH006",
description = "acess 토큰 모양이 이상함",
content = @Content(schema = @Schema(implementation = CommonResponse.class))),
@ApiResponse(
responseCode = "MEMBER_001",
description = "사용자가 존재하지 않습니다.",
content = @Content(schema = @Schema(implementation = CommonResponse.class))),
})
public CommonResponse<Void> subscribeDailyPush(
@Valid @RequestBody MemberRequest.ToggleDailyPushAlarmDTO request,
@Parameter(hidden = true) @AuthMember Member member
){
memberFacade.subScribeDailyPush(request,member);
return CommonResponse.onSuccess();
}

@Operation(
summary = "02-01 Member\uD83D\uDC64 accessToken 재발급 받기 V2",
description = "accessToken 만료 시 refreshToken으로 재발급을 받는 API 입니다.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public void commence(
ApiErrorResult apiErrorResult =
ApiErrorResult.builder()
.isSuccess(false)
.code(ErrorCode._UNAUTHORIZED.getCode())
.message(ErrorCode._UNAUTHORIZED.getMessage())
.code(ErrorCode.UNAUTHORIZED_EXCEPTION.getCode())
.message(ErrorCode.UNAUTHORIZED_EXCEPTION.getMessage())
.result(null)
.build();
try {
Expand Down
2 changes: 1 addition & 1 deletion Briefing-Api/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jwt:
# dev server
secret: ${JWT_SECRET}
authorities-key: authoritiesKey
access-token-validity-in-seconds: 30000
access-token-validity-in-seconds: 1200000
refresh-token-validity-in-seconds: 1210000000 # 14 d

openai:
Expand Down

0 comments on commit 63b3648

Please sign in to comment.