| 6 | |
| 7 | @Controller('auth') |
| 8 | export class AuthController { |
| 9 | constructor(private readonly authService: AuthService) {} |
| 10 | @Post('google') |
| 11 | async googleAuthRedirect(@Body('code') code: string, @Res() res: Response) { |
| 12 | return await this.authService.googleLoginCallback(code, res); |
| 13 | } |
| 14 | @UseGuards(JwtAuthGuard) |
| 15 | @Get('logout') |
| 16 | async logout(@Res() res: Response) { |
| 17 | return await this.authService.logout(res); |
| 18 | } |
| 19 | @UseGuards(JwtAuthGuard) |
| 20 | @Get('me') |
| 21 | async getCurrentUser(@Req() req: Request) { |
| 22 | const user = await this.authService.getCurrentUser(req); |
| 23 | return user; |
| 24 | } |
| 25 | } |
nothing calls this directly
no outgoing calls
no test coverage detected