Skip to content

Commit

Permalink
refactor(#10): 네이버 회원탈퇴 명세서 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoDora committed Oct 12, 2023
1 parent 0c5ff3a commit eebd9e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/auth/controllers/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ export class AuthController {
return await this.tokenService.deleteTokens(userId);
}

@ApiOperation({ summary: '네이버 회원탈퇴 API', description: '네이버 회원탈퇴 API' })
@ApiResponse({ status: 201, description: '성공적으로 회원탈퇴 된 경우', content: { JSON: { example: { message: "네이버 연동 해제가 완료되었습니다." } } } })
@ApiResponse({ status: 403, description: '만료된 액세스 토큰인 경우', content: { JSON: { example: { statusCode: 403, message: '만료된 토큰입니다.' } } } })
@ApiResponse({ status: 404, description: 'DB에서 토큰을 찾을 수 없는 경우', content: { JSON: { example: { statusCode: 404, message: '토큰을 찾을 수 없습니다.' } } } })
@ApiHeaders([{ name: 'access_token', description: '액세스 토큰', required: true, example: '여기에 액세스 토큰' }])
@Post('naver/unlink')
async naverUnlink(@Headers('access_token') accessToken: string) {
const userId = await this.tokenService.decodeToken(accessToken);
Expand Down
2 changes: 1 addition & 1 deletion src/auth/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class AuthService {
};

axios.post(naverUnlinkUrl, naverUnlinkBody, naverUnlinkHeader);
return { status: true, message: "네이버 연동 해제가 완료되었습니다." };
return { message: "네이버 연동 해제가 완료되었습니다." };
}

async accountDelete(userId: number) {
Expand Down

0 comments on commit eebd9e6

Please sign in to comment.