feat(auth): add role guards and protect admin routes

This commit is contained in:
2026-06-04 21:57:39 +02:00
parent 601dea9526
commit 12cbec92a0
8 changed files with 114 additions and 27 deletions
+18
View File
@@ -0,0 +1,18 @@
import { z } from "zod"
export const signInSchema = z.object({
username: z
.string()
.min(1, {
error: "Invalid username",
})
.nonempty("Username is required"),
password: z
.string()
.min(3, {
error: "Password is too short",
})
.nonempty("Password is required"),
})
export type SignInFormType = z.infer<typeof signInSchema>