forked from Ynov/ptitspas-ynov-back
edited auth correction
This commit is contained in:
parent
6907aa77c7
commit
58f08d00a3
@ -9,21 +9,22 @@ import { AuthGuard } from 'src/common/guards/auth.guard';
|
||||
@ApiTags('Authentification')
|
||||
@Controller('auth')
|
||||
export class AuthController {
|
||||
constructor(private readonly authService: AuthService) {}
|
||||
constructor(private readonly authService: AuthService) { }
|
||||
|
||||
@Public()
|
||||
@ApiOperation({ summary: 'Connexion' })
|
||||
@Post('login')
|
||||
async login(@Body() dto: LoginDto) {
|
||||
return this.authService.login(dto);
|
||||
}
|
||||
|
||||
@Public()
|
||||
@Post('register')
|
||||
@ApiOperation({ summary: 'Inscription' })
|
||||
async register(@Body() dto: RegisterDto) {
|
||||
return this.authService.register(dto);
|
||||
}
|
||||
|
||||
@Public()
|
||||
@Post('refresh')
|
||||
@ApiOperation({ summary: 'Rafraichir les tokens' })
|
||||
async refresh(@Body('refresh_token') refreshToken: string) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user