From d261a3fff9832845636aaf374942f385c54429ac Mon Sep 17 00:00:00 2001 From: Nikoloz Muladze Date: Mon, 20 Nov 2023 17:59:16 +0400 Subject: [PATCH] add: reset password route --- src/routes/user.routes.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/routes/user.routes.ts b/src/routes/user.routes.ts index 43de21c..845b138 100644 --- a/src/routes/user.routes.ts +++ b/src/routes/user.routes.ts @@ -3,11 +3,13 @@ import validateResource from "../middleware/validateResource"; import { createUserSchema, forgotPasswordSchema, + resetPasswordSchema, verifyUserSchema, } from "../schema/user.schema"; import { createUserHandler, forgotPasswordHandler, + resetPasswordHandler, verifyUserHandler, } from "../controller/user.controller"; @@ -31,4 +33,10 @@ router.post( forgotPasswordHandler ); +router.post( + "/api/users/resetpassword/:id/:passwordResetCode", + validateResource(resetPasswordSchema), + resetPasswordHandler +); + export default router;