feat: bootstrap codexdash app
This commit is contained in:
11
apps/api/src/auth/dto/login.dto.ts
Normal file
11
apps/api/src/auth/dto/login.dto.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { IsEmail, IsString, MinLength } from 'class-validator';
|
||||
import { LoginInput } from '@codexdash/shared-types';
|
||||
|
||||
export class LoginDto implements LoginInput {
|
||||
@IsEmail()
|
||||
email!: string;
|
||||
|
||||
@IsString()
|
||||
@MinLength(8)
|
||||
password!: string;
|
||||
}
|
||||
15
apps/api/src/auth/dto/register.dto.ts
Normal file
15
apps/api/src/auth/dto/register.dto.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { IsEmail, IsString, MinLength } from 'class-validator';
|
||||
import { RegisterInput } from '@codexdash/shared-types';
|
||||
|
||||
export class RegisterDto implements RegisterInput {
|
||||
@IsEmail()
|
||||
email!: string;
|
||||
|
||||
@IsString()
|
||||
@MinLength(8)
|
||||
password!: string;
|
||||
|
||||
@IsString()
|
||||
@MinLength(2)
|
||||
name!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user