feat(api-auth): implement email code send and login

This commit is contained in:
2026-04-04 21:02:17 +08:00
parent 5d650e00f6
commit efe55fdc2f
13 changed files with 2282 additions and 13 deletions
+11
View File
@@ -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;
}