init: init project
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user