import express from "express";
import isAuth from "../middleware/isAuth";

import * as TicketController from "../controllers/TicketController";

const ticketRoutes = express.Router(); 

// ticketRoutes.get("/tickets/cache", isAuth, TicketController.ticketsCache); 

ticketRoutes.get("/tickets/count", isAuth, TicketController.count); 

ticketRoutes.get("/tickets", isAuth, TicketController.index);   

ticketRoutes.get("/tickets/:ticketId", isAuth, TicketController.show);

ticketRoutes.post(
  "/tickets/remote/create", isAuth,
  TicketController.remoteTicketCreation
); 

ticketRoutes.post("/tickets", isAuth, TicketController.store);

ticketRoutes.put("/tickets/:ticketId", isAuth, TicketController.update);

ticketRoutes.delete("/tickets/:ticketId", isAuth, TicketController.remove);

export default ticketRoutes;
