const express = require('express');
const Router = express.Router();
const controller = require("../app/controllers/Diposit.Controller");
const authorize = require('../app/service/authorize');
const autintiation = require("../app/middleware/authMiddleware");
// ---------------------------------------------------
Router.post("/add", autintiation, authorize("user"), controller.request);
Router.get("/history", autintiation, authorize("user"), controller.histroy);

Router.get("/", autintiation, authorize("admin"), controller.index);
Router.get("/old", autintiation, authorize("admin"), controller.old);
Router.patch("/accespt/:id", autintiation, authorize("admin"), controller.accespt);
Router.patch("/cansel/:id", autintiation, authorize("admin"), controller.cansel);
Router.patch("/edite/:id", autintiation, authorize("admin"), controller.edite);

// ----------------------------------------------------
module.exports = Router;