mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-16 01:46:38 +00:00
used zod codemod
This commit is contained in:
@@ -99,28 +99,28 @@ async function clearChallenge(sessionId: string) {
|
||||
await db.delete(webauthnChallenge).where(eq(webauthnChallenge.sessionId, sessionId));
|
||||
}
|
||||
|
||||
export const registerSecurityKeyBody = z.object({
|
||||
export const registerSecurityKeyBody = z.strictObject({
|
||||
name: z.string().min(1),
|
||||
password: z.string().min(1),
|
||||
code: z.string().optional()
|
||||
}).strict();
|
||||
});
|
||||
|
||||
export const verifyRegistrationBody = z.object({
|
||||
export const verifyRegistrationBody = z.strictObject({
|
||||
credential: z.any()
|
||||
}).strict();
|
||||
});
|
||||
|
||||
export const startAuthenticationBody = z.object({
|
||||
email: z.string().email().optional()
|
||||
}).strict();
|
||||
export const startAuthenticationBody = z.strictObject({
|
||||
email: z.email().optional()
|
||||
});
|
||||
|
||||
export const verifyAuthenticationBody = z.object({
|
||||
export const verifyAuthenticationBody = z.strictObject({
|
||||
credential: z.any()
|
||||
}).strict();
|
||||
});
|
||||
|
||||
export const deleteSecurityKeyBody = z.object({
|
||||
export const deleteSecurityKeyBody = z.strictObject({
|
||||
password: z.string().min(1),
|
||||
code: z.string().optional()
|
||||
}).strict();
|
||||
});
|
||||
|
||||
export async function startRegistration(
|
||||
req: Request,
|
||||
|
||||
Reference in New Issue
Block a user