Files
quicklanch-server/dist/app/modules/profile/profile.route.js
T

13 lines
606 B
JavaScript
Raw Normal View History

import { Router } from "express";
import RequestValidator from "../../middlewares/request_validator.js";
import { profile_controller } from "./profile.controller.js";
import { profile_validations } from "./profile.validation.js";
import auth from "../../middlewares/auth.js";
import uploader from "../../middlewares/uploader.js";
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;