chore: remove old auth DTOs from user/dto after refactor
This commit is contained in:
parent
489edf22e7
commit
e46a16735c
@ -1,17 +0,0 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsEmail, IsString, MaxLength, MinLength } from "class-validator";
|
||||
|
||||
export class LoginDto {
|
||||
@ApiProperty({ example: 'mon.utilisateur@exemple.com', description: "Adresse email de l'utililisateur" })
|
||||
@IsEmail()
|
||||
email: string;
|
||||
|
||||
@ApiProperty({
|
||||
example: "Mon_motdepasse_fort_1234?",
|
||||
description: "Mot de passe de l'utilisateur"
|
||||
})
|
||||
@IsString({ message: 'Le mot de passe doit etre une chaine de caracteres' })
|
||||
//@MinLength(8, { message: 'Le mot de passe doit contenir au moins 8 caracteres' })
|
||||
@MaxLength(50)
|
||||
password: string;
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { RoleType, StatutUtilisateurType } from 'src/entities/users.entity';
|
||||
|
||||
export class ProfileResponseDto {
|
||||
@ApiProperty()
|
||||
id: string;
|
||||
|
||||
@ApiProperty()
|
||||
email: string;
|
||||
|
||||
@ApiProperty({ enum: RoleType })
|
||||
role: RoleType;
|
||||
|
||||
@ApiProperty()
|
||||
prenom?: string;
|
||||
|
||||
@ApiProperty()
|
||||
nom?: string;
|
||||
|
||||
@ApiProperty({ enum: StatutUtilisateurType })
|
||||
statut: StatutUtilisateurType;
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsString } from "class-validator";
|
||||
|
||||
export class RefreshTokenDto {
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Token de rafraîchissement',
|
||||
example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
|
||||
})
|
||||
@IsString()
|
||||
refresh_token: string;
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
import { ApiProperty, OmitType } from '@nestjs/swagger';
|
||||
import { IsEnum, IsOptional } from 'class-validator';
|
||||
import { CreateUserDto } from './create_user.dto';
|
||||
import { RoleType, StatutUtilisateurType } from 'src/entities/users.entity';
|
||||
|
||||
export class RegisterDto extends OmitType(CreateUserDto, ['changement_mdp_obligatoire'] as const) {
|
||||
@ApiProperty({ enum: [RoleType.ASSISTANTE_MATERNELLE, RoleType.PARENT], default: RoleType.PARENT })
|
||||
@IsEnum(RoleType)
|
||||
role: RoleType = RoleType.PARENT;
|
||||
|
||||
@IsEnum(StatutUtilisateurType)
|
||||
@IsOptional()
|
||||
statut?: StatutUtilisateurType = StatutUtilisateurType.EN_ATTENTE;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user