Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into dev
  • Loading branch information
dongree committed Nov 21, 2024
2 parents c739e1f + 2313d7f commit ed148e9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions BE/src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,14 @@ export class AuthController {
check() {
return { isLogin: true };
}

@ApiOperation({ summary: '로그아웃 API' })
@Get('/logout')
@UseGuards(AuthGuard('jwt'))
logout(@Res() res: Response) {
res.clearCookie('accessToken');
res.clearCookie('refreshToken');
res.clearCookie('isRefreshToken');
return res.status(200).json({ message: '로그아웃 성공' });
}
}

0 comments on commit ed148e9

Please sign in to comment.