fix(auth): Correct API paths and resolve build/type errors in tests and config

This commit is contained in:
Yunxiao Xu
2026-02-11 20:30:32 -08:00
parent e3bc699c64
commit f8612cfcb8
5 changed files with 109 additions and 6 deletions

View File

@@ -0,0 +1,18 @@
import { z } from "zod"
export const loginSchema = z.object({
email: z.email("Invalid email address"),
password: z.string().min(6, "Password must be at least 6 characters"),
})
export const registerSchema = z.object({
email: z.email("Invalid email address"),
password: z.string().min(6, "Password must be at least 6 characters"),
confirmPassword: z.string().min(6, "Password must be at least 6 characters"),
}).refine((data) => data.password === data.confirmPassword, {
message: "Passwords do not match",
path: ["confirmPassword"],
})
export type LoginInput = z.infer<typeof loginSchema>
export type RegisterInput = z.infer<typeof registerSchema>