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 : 푸쉬알람 허용 V2 구현 #189

Merged
merged 1 commit into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading