public register

This commit is contained in:
sdraris 2025-09-04 11:33:48 +02:00
parent e181d34b6d
commit 6907aa77c7
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import { AuthGuard } from 'src/common/guards/auth.guard';
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) {

View File

@ -4,7 +4,7 @@ import { CreateUserDto } from './create_user.dto';
import { RoleType, StatutUtilisateurType } from 'src/entities/users.entity'; import { RoleType, StatutUtilisateurType } from 'src/entities/users.entity';
export class RegisterDto extends OmitType(CreateUserDto, ['must_change_password'] as const) { export class RegisterDto extends OmitType(CreateUserDto, ['must_change_password'] as const) {
@ApiProperty({ enum: RoleType, default: RoleType.PARENT }) @ApiProperty({ enum: [RoleType.ASSISTANTE_MATERNELLE, RoleType.PARENT], default: RoleType.PARENT })
@IsEnum(RoleType) @IsEnum(RoleType)
role: RoleType = RoleType.PARENT; role: RoleType = RoleType.PARENT;