@arsendoman/book-publisher-store
Version:
A Nest.js package for book publishing and storing
28 lines (24 loc) • 708 B
text/typescript
import {
Controller,
ValidationPipe,
UsePipes,
Get,
UseGuards,
Req,
} from '@nestjs/common';
import { GoogleAuthGuard } from '../../../application/guards/google.auth.guard';
import { AuthService } from '../../../application/auth/services/auth.service';
('auth')
(new ValidationPipe())
export class GoogleAuthController {
constructor(private readonly authService: AuthService) {}
('google')
(GoogleAuthGuard)
// eslint-disable-next-line @typescript-eslint/no-empty-function
async googleAuth(() req) {}
('google/redirect')
(GoogleAuthGuard)
async googleRedirect(() req) {
return this.authService.login(req.user);
}
}