const express = require('express');
const Router = express.Router();

const authorize = require('../app/service/authorize');
const autintiation = require("../app/middleware/authMiddleware");
const controller = require('../app/controllers/Widthdrow.Controller');

// ---------------------------------------------------
Router.post("/", autintiation, authorize("user", 'club'), controller.request);
Router.get("/history", autintiation, authorize("user", 'club'), controller.history);
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);
// ----------------------------------------------------
module.exports = Router;