const express = require('express');
const Router = express.Router();
const controller = require("../app/controllers/Quarion.controller");
const validator = require("../app/validator/auto.validator");
const authorize = require('../app/service/authorize');
const authentication = require('../app/middleware/authMiddleware');

Router.post("/quartion", authentication, authorize("admin", "gamer"), validator.add, validator.error, controller.add);
Router.get("/quartion", authentication, authorize("admin", "gamer"), controller.index);
Router.delete("/quartion/:id", authentication, authorize("admin"), controller.delete);
Router.put("/quartion/:id", authentication, authorize("admin", "gamer"), controller.update);
Router.delete("/ans/:id", authentication, authorize("admin", "gamer"), controller.ansDlete);
Router.get("/quartion-add/:sport", authentication, authorize("admin", "gamer"), controller.getforadd);

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