forked from Ynov/ptitspas-ynov-back
public register
This commit is contained in:
parent
e181d34b6d
commit
6907aa77c7
@ -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) {
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user