MCPcopy Create free account
hub / github.com/bsoc-bitbyte/busify / AuthController

Class AuthController

backend/src/Auth/auth.controller.ts:8–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7@Controller('auth')
8export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected