enh
This commit is contained in:
parent
128e3b6a58
commit
68103010c6
4 changed files with 0 additions and 26 deletions
|
|
@ -25,7 +25,6 @@
|
|||
"@types/bcryptjs": "^2.4.6",
|
||||
"@types/cors": "^2.8.19",
|
||||
"@types/jsonwebtoken": "^9.0.10",
|
||||
"@types/multer": "^2.0.0",
|
||||
"axios": "^1.11.0",
|
||||
"bcryptjs": "^3.0.2",
|
||||
"bullmq": "^5.63.0",
|
||||
|
|
@ -36,9 +35,7 @@
|
|||
"express": "^5.1.0",
|
||||
"fuse.js": "^7.1.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"multer": "^2.0.2",
|
||||
"node-cron": "^4.2.1",
|
||||
"razorpay": "^2.9.6",
|
||||
"redis": "^5.9.0",
|
||||
"zod": "^4.1.12"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
import { Router } from "express";
|
||||
import { authenticateStaff } from "@/src/middleware/staff-auth";
|
||||
import productRouter from "@/src/apis/admin-apis/apis/product.router"
|
||||
|
||||
const router = Router();
|
||||
|
||||
// Apply staff authentication to all admin routes
|
||||
router.use(authenticateStaff);
|
||||
|
||||
// Product routes
|
||||
router.use("/products", productRouter);
|
||||
|
||||
const avRouter = router;
|
||||
|
||||
export default avRouter;
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
import { Router } from "express";
|
||||
import { createProduct, updateProduct } from "@/src/apis/admin-apis/apis/product.controller"
|
||||
import uploadHandler from '@/src/lib/upload-handler';
|
||||
|
||||
const router = Router();
|
||||
|
||||
// Product routes
|
||||
router.post("/", uploadHandler.array('images'), createProduct);
|
||||
router.put("/:id", uploadHandler.array('images'), updateProduct);
|
||||
|
||||
export default router;
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
import multerParent from 'multer';
|
||||
const uploadHandler = multerParent({
|
||||
limits: {
|
||||
fileSize: 10 * 1024 * 1024, // 10 MB
|
||||
}
|
||||
});
|
||||
|
||||
export default uploadHandler
|
||||
Loading…
Add table
Reference in a new issue