Moved the parsing logic to backend as suggested.

This commit is contained in:
Owaise Imdad committed 2025-04-29 12:47:24 +05:30
1 parent b2fd9b1e89
commit bd8554707d
10 files changed
+165 -103

No files matched your search

+6
View File
@@ -1,7 +1,12 @@
import { Router } from "express";
import { isAllowed } from "../middleware/isAllowed.js";
import multer from "multer";
import { fetchMonitorCertificate } from "../controllers/controllerUtils.js";
const upload = multer({
storage: multer.memoryStorage() // Store file in memory as Buffer
});
class MonitorRoutes {
constructor(monitorController) {
this.router = Router();
@@ -89,6 +94,7 @@ class MonitorRoutes {
this.router.post(
"/bulk",
isAllowed(["admin", "superadmin"]),
upload.single("csvFile"),
this.monitorController.createBulkMonitors
);