import { Router } from "express";
import Authentication from "../../Middlewares/Authnetication";
import { CashEntryController } from "../../controllers/Admin/CashEntryController";

class CashEntryRouter {
  public router: Router;

  constructor() {
    this.router = Router();
    this.post();
    this.get();
  }

  public post() {
    this.router.post("/add-edit/:id?", Authentication.admin, CashEntryController.addEdit);
  }

  public get() {
    this.router.get("/list", Authentication.admin, CashEntryController.list);
    this.router.get("/view/:id", Authentication.admin, CashEntryController.view);
  }  
}

export default new CashEntryRouter().router;
