diff --git a/src/routes/user/dto/login.dto.ts b/src/routes/user/dto/login.dto.ts deleted file mode 100644 index f292798..0000000 --- a/src/routes/user/dto/login.dto.ts +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/src/routes/user/dto/profile_response.dto.ts b/src/routes/user/dto/profile_response.dto.ts deleted file mode 100644 index 4ae9d65..0000000 --- a/src/routes/user/dto/profile_response.dto.ts +++ /dev/null @@ -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; -} diff --git a/src/routes/user/dto/refresh_token.dto.ts b/src/routes/user/dto/refresh_token.dto.ts deleted file mode 100644 index c328692..0000000 --- a/src/routes/user/dto/refresh_token.dto.ts +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/src/routes/user/dto/register.dto.ts b/src/routes/user/dto/register.dto.ts deleted file mode 100644 index fc8cabd..0000000 --- a/src/routes/user/dto/register.dto.ts +++ /dev/null @@ -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; -}