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 {
|
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) {
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user