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')
|
@ApiTags('Authentification')
|
||||||
@Controller('auth')
|
@Controller('auth')
|
||||||
export class AuthController {
|
export class AuthController {
|
||||||
constructor(private readonly authService: AuthService) {}
|
constructor(private readonly authService: AuthService) { }
|
||||||
|
|
||||||
@Public()
|
|
||||||
@ApiOperation({ summary: 'Connexion' })
|
@ApiOperation({ summary: 'Connexion' })
|
||||||
@Post('login')
|
@Post('login')
|
||||||
async login(@Body() dto: LoginDto) {
|
async login(@Body() dto: LoginDto) {
|
||||||
return this.authService.login(dto);
|
return this.authService.login(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Public()
|
||||||
@Post('register')
|
@Post('register')
|
||||||
@ApiOperation({ summary: 'Inscription' })
|
@ApiOperation({ summary: 'Inscription' })
|
||||||
async register(@Body() dto: RegisterDto) {
|
async register(@Body() dto: RegisterDto) {
|
||||||
return this.authService.register(dto);
|
return this.authService.register(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Public()
|
||||||
@Post('refresh')
|
@Post('refresh')
|
||||||
@ApiOperation({ summary: 'Rafraichir les tokens' })
|
@ApiOperation({ summary: 'Rafraichir les tokens' })
|
||||||
async refresh(@Body('refresh_token') refreshToken: string) {
|
async refresh(@Body('refresh_token') refreshToken: string) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user