Files
quicklanch-server/src/app/modules/profile/profile.route.ts
T
2026-04-02 21:27:09 +06:00

23 lines
611 B
TypeScript

import { Router } from "express";
import RequestValidator from "../../middlewares/request_validator";
import { profile_controller } from "./profile.controller";
import { profile_validations } from "./profile.validation";
import auth from "../../middlewares/auth";
import uploader from "../../middlewares/uploader";
const router = Router();
router.patch(
"/",
auth("USER"),
uploader.single("file"),
(req, res, next) => {
req.body = JSON.parse(req?.body?.data);
next();
},
RequestValidator(profile_validations.update_profile),
profile_controller.update_profile,
);
export default router;