Added urlToken to Zod schema

This commit is contained in:
2024-11-04 22:36:00 +01:00
parent 7ec4303b40
commit 1526e0947a
2 changed files with 5 additions and 1 deletions

View File

@ -94,7 +94,7 @@ async function addHttpRoutes(app: Application) {
const { urlToken, password } = req.body
try {
newPasswordSchema.parse({ password })
newPasswordSchema.parse({ urlToken, password })
} catch (error: any) {
return res.status(400).json({ message: error.errors[0]?.message })
}