feat(api-auth): implement email code send and login
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { IsEmail, IsString, Length, Matches } from "class-validator";
|
||||
|
||||
export class EmailLoginDto {
|
||||
@IsEmail()
|
||||
email!: string;
|
||||
|
||||
@IsString()
|
||||
@Length(6, 6)
|
||||
@Matches(/^\d{6}$/)
|
||||
code!: string;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { IsEmail } from "class-validator";
|
||||
|
||||
export class SendEmailCodeDto {
|
||||
@IsEmail()
|
||||
email!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user