This commit is contained in:
shafi54 2026-03-26 17:42:49 +05:30
parent 128e3b6a58
commit 68103010c6
4 changed files with 0 additions and 26 deletions

View file

@ -25,7 +25,6 @@
"@types/bcryptjs": "^2.4.6", "@types/bcryptjs": "^2.4.6",
"@types/cors": "^2.8.19", "@types/cors": "^2.8.19",
"@types/jsonwebtoken": "^9.0.10", "@types/jsonwebtoken": "^9.0.10",
"@types/multer": "^2.0.0",
"axios": "^1.11.0", "axios": "^1.11.0",
"bcryptjs": "^3.0.2", "bcryptjs": "^3.0.2",
"bullmq": "^5.63.0", "bullmq": "^5.63.0",
@ -36,9 +35,7 @@
"express": "^5.1.0", "express": "^5.1.0",
"fuse.js": "^7.1.0", "fuse.js": "^7.1.0",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"multer": "^2.0.2",
"node-cron": "^4.2.1", "node-cron": "^4.2.1",
"razorpay": "^2.9.6",
"redis": "^5.9.0", "redis": "^5.9.0",
"zod": "^4.1.12" "zod": "^4.1.12"
}, },

View file

@ -1,15 +1,11 @@
import { Router } from "express"; import { Router } from "express";
import { authenticateStaff } from "@/src/middleware/staff-auth"; import { authenticateStaff } from "@/src/middleware/staff-auth";
import productRouter from "@/src/apis/admin-apis/apis/product.router"
const router = Router(); const router = Router();
// Apply staff authentication to all admin routes // Apply staff authentication to all admin routes
router.use(authenticateStaff); router.use(authenticateStaff);
// Product routes
router.use("/products", productRouter);
const avRouter = router; const avRouter = router;
export default avRouter; export default avRouter;

View file

@ -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;

View file

@ -1,8 +0,0 @@
import multerParent from 'multer';
const uploadHandler = multerParent({
limits: {
fileSize: 10 * 1024 * 1024, // 10 MB
}
});
export default uploadHandler