Add admin login and password change endpoints

Introduces POST /login and PATCH /password routes for admin authentication and password management. Adds corresponding schema validation for login and password change, enforces stricter password requirements, and updates adminService with JWT-based profile retrieval and improved token handling.
This commit is contained in:
2026-01-18 19:38:24 +01:00
parent d590ecce6d
commit 86349bcf4f
10 changed files with 102 additions and 5 deletions

View File

@@ -2,6 +2,10 @@ const z = require("zod")
module.exports = {
DELETE: {
headers: z.object({
"content-type": z.string().regex(/application\/json/i),
"authorization": z.string().startsWith("Bearer ")
}),
query: z.object({
hash: z.string().length(64)
})