From 6907aa77c706d2a8dd51705a5b6287779bd74d4f Mon Sep 17 00:00:00 2001 From: sdraris Date: Thu, 4 Sep 2025 11:33:48 +0200 Subject: [PATCH] public register --- src/routes/auth/auth.controller.ts | 1 + src/routes/user/dto/register.dto.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/auth/auth.controller.ts b/src/routes/auth/auth.controller.ts index d20ee86..3f814a2 100644 --- a/src/routes/auth/auth.controller.ts +++ b/src/routes/auth/auth.controller.ts @@ -11,6 +11,7 @@ import { AuthGuard } from 'src/common/guards/auth.guard'; export class AuthController { constructor(private readonly authService: AuthService) {} + @Public() @ApiOperation({ summary: 'Connexion' }) @Post('login') async login(@Body() dto: LoginDto) { diff --git a/src/routes/user/dto/register.dto.ts b/src/routes/user/dto/register.dto.ts index 0d717f7..c4b0de5 100644 --- a/src/routes/user/dto/register.dto.ts +++ b/src/routes/user/dto/register.dto.ts @@ -4,7 +4,7 @@ import { CreateUserDto } from './create_user.dto'; import { RoleType, StatutUtilisateurType } from 'src/entities/users.entity'; 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) role: RoleType = RoleType.PARENT;