login,registro y auth funcionando
This commit is contained in:
@@ -4,6 +4,7 @@ import { AuthService } from './auth.service';
|
||||
import { LoginDto } from './dto/login.dto';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
import { RegisterDto } from './dto/register.dto';
|
||||
import { ApiBearerAuth } from '@nestjs/swagger';
|
||||
|
||||
@Controller()
|
||||
export class AuthController {
|
||||
@@ -16,6 +17,9 @@ export class AuthController {
|
||||
return this.authService.login(user);
|
||||
}
|
||||
|
||||
|
||||
@UseGuards(AuthGuard('jwt'))
|
||||
@ApiBearerAuth('bearer')
|
||||
@UseGuards(AuthGuard('jwt'))
|
||||
@Get('profile')
|
||||
@AuthDocumentation.bearerAuth()
|
||||
|
||||
Reference in New Issue
Block a user