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.
13 lines
306 B
JavaScript
13 lines
306 B
JavaScript
const z = require("zod")
|
|
|
|
module.exports = {
|
|
GET: {
|
|
headers: z.object({
|
|
"content-type": z.string().regex(/application\/json/i),
|
|
"authorization": z.string().startsWith("Bearer ")
|
|
}),
|
|
query: z.object({
|
|
uuid: z.string().uuid()
|
|
})
|
|
}
|
|
} |