const express = require('express') const route = express.Router() const controller = require("../Controller/Inventory_Movement") const { protect, protectAtlogin } = require("../Middleware/auth") // const multer = require('multer') // const moment = require('moment') // var storage = multer.diskStorage({ // destination: function (req, file, cb) { // if (file.fieldname == "store_image") cb(null, "upload/store/tmp_post"); // }, // filename: function (req, file, cb) { // cb( // null, // moment(Date.now()).format("YYYY-MM-DD_HH-mm-ss_") + file.originalname // ); // }, // }); // var upload = multer({ storage: storage }); route.route("/add_stock").post(protect, controller.createStock) route.route("/get_all_stock").get(protect, controller.getAllStock) // route.route("/register").post(upload.single("store_image"), protectAtlogin, controller.registerStore) module.exports = route;