import { Router } from "express";
import Authentication from "../../Middlewares/Authnetication";
import { CarController } from "../../controllers/App/CarController";

class CarRoutes {
  public router: Router;

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

  public post() {
    this.router.post("/add", Authentication.user, Authentication.userLanguage, CarController.add);
    this.router.post("/delete", Authentication.user, Authentication.userLanguage, CarController.delete);
  }

  public get() {
    this.router.get("/list", Authentication.user, Authentication.userLanguage, CarController.list);
  }
}

export default new CarRoutes().router;
