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/Methods.Controller.js');

// ---------------------------------------------------
Router.get("/", autintiation, authorize("admin"), controller.index);
Router.get("/get", autintiation, authorize("user","club"), controller.get);
Router.post("/", autintiation, authorize("admin"), controller.store);
Router.put("/:id", autintiation, authorize("admin"), controller.update);
Router.patch("/:id", autintiation, authorize("admin"), controller.active);
Router.delete("/:id", autintiation, authorize("admin"), controller.delete);

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