import express from "express"; const router = express.Router(); import auth from "../middleware/auth.js"; import { createProperty, getUserProperties, getPropertyById, updatePropertyById, getProperties, addFundDetails, getFundDetails, deleteFundDetail, } from "../controllers/property.js"; router.post("/", auth, createProperty); router.get("/user/:userId", getUserProperties); router.get("/:propertyId", getPropertyById); router.put("/:id", updatePropertyById); router.get("/", getProperties); router.put("/:id/fund-details", addFundDetails); router.get("/:id/fund-details", getFundDetails); router.delete('/:id/fund-details/:fundDetailId', auth, deleteFundDetail); export default router;