import { Router } from "express";
import { AddressesController } from "./controller.js";
import { AuthMiddleware } from "../middlewares/auth.middleware.js";

export class AddressesRoutes {
  static get routes(): Router {
    const router = Router();
    const controller = new AddressesController();

    router.get("/colonias", controller.colonias);
    router.get("/me", AuthMiddleware.validate, controller.myAddress);
    router.put("/me", AuthMiddleware.validate, controller.setAddress);

    return router;
  }
}
