From 0e0f176e503ce0d785c76ace77bd56f79e16494d Mon Sep 17 00:00:00 2001 From: azures04 Date: Sun, 18 Jan 2026 21:01:46 +0100 Subject: [PATCH] Update login.js --- schemas/admin/login.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/schemas/admin/login.js b/schemas/admin/login.js index af0dc7f..6155d8c 100644 --- a/schemas/admin/login.js +++ b/schemas/admin/login.js @@ -2,16 +2,16 @@ const z = require("zod") module.exports = { POST: { - headers: { - "content-type": z.string().regex(/application\/json/i) - }, - body: { + headers: z.object({ + "content-type": z.string().regex(/application\/json/i), + }), + body: z.object({ username: z.string() .min(1), password: z.string() .min(8, { message: "The password must be at least 8 characters long." }) .regex(/[A-Z]/, { message: "The password must contain a capital letter." }) .regex(/[0-9]/, { message: "The password must contain a number." }) - } + }) } } \ No newline at end of file