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

Router.post("/:ans_id", autintiation, authorize("user"), controller.request);
Router.patch("/resuld", autintiation, authorize("admin","gamer"), controller.winloss);
Router.patch("/win", autintiation, authorize("admin","gamer"), controller.win);
Router.patch("/loss", autintiation, authorize("admin","gamer"), controller.loss);
Router.patch("/retrun", autintiation, authorize("admin","gamer"), controller.retrun);
Router.patch("/reset", autintiation, authorize("admin","gamer"), controller.reset);
Router.patch("/better/:id", autintiation, authorize("admin","gamer"), controller.better);










// Router.post("/wiinbyid", controller.winloss);
// Router.post("/win/:qid/:aid", controller.win);
// Router.post("/resetbyid", controller.reset);
// Router.get("/better/:id", controller.getBetter);
// Router.get("/better/match/:id", controller.getMatch);

module.exports = Router;