release: v4.1.0

This commit is contained in:
Amruth Pillai
2024-05-05 14:55:06 +02:00
parent 68252c35fc
commit e87b05a93a
282 changed files with 11461 additions and 10713 deletions
+3 -5
View File
@@ -10,11 +10,9 @@ export const loginSchema = z
})
.refine(
(value) => {
if (value.identifier.includes("@")) {
return z.string().email().parse(value.identifier);
} else {
return usernameSchema.parse(value.identifier);
}
return value.identifier.includes("@")
? z.string().email().parse(value.identifier)
: usernameSchema.parse(value.identifier);
},
{ message: "InvalidCredentials" },
);
+1 -4
View File
@@ -2,10 +2,7 @@ import { createZodDto } from "nestjs-zod/dto";
import { z } from "nestjs-zod/z";
export const twoFactorSchema = z.object({
code: z
.string()
.length(6)
.regex(/^[0-9]+$/, { message: "code must be a 6 digit number" }),
code: z.string().length(6).regex(/^\d+$/, { message: "code must be a 6 digit number" }),
});
export class TwoFactorDto extends createZodDto(twoFactorSchema) {}