const express = require("express");
var app = express();
var bodyParser = require('body-parser');
app.use(bodyParser.json({ limit: '100mb' }));
const mongoose = require("mongoose");
app.use(bodyParser.urlencoded({ limit: '500mb', extended: true, parameterLimit: 100000 }));
const { catchErrors } = require("../handlers/errorHandlers");
const authenticateUserByToken = require("../apps/middlewares/authenticateUserByToken");

const router = express.Router();
var cron = require('node-cron');       

const AuthController = require("../controllers/AuthController");
const ItController = require("../controllers/ItController");
const ReportController = require("../controllers/ReportController");

//_______________________________ Start Amz SP-API List Orders management_______________________________
// router.route("/marketplace/login").post(catchErrors(AuthController.Login));
 
//Admin Routes
// router.route("/adminProfile:admin_id").get(AdminController.AdminProfile);
router.route("/updateShelfLocation").post(ItController.UpdateShelfLocation);
router.route("/updateInQty").post(ItController.UpdateInQty);
router.route("/updateCategory").post(ItController.UpdateCategory);
router.route("/updateProductFinalPrice").post(ItController.UpdateProductFinalPrice);
router.route("/dailySalesReport").get(ReportController.DailySalesReport);
router.route("/getUser").post(ItController.AllUser);
router.route("/updateTxn").post(ItController.UpdateTxn);
router.route("/sellerAccountHolder").post(ReportController.SellerAccountHolder);
  
module.exports = router;
