estatesfunding/ef-api/routes/property.js

23 lines
613 B
JavaScript
Raw Normal View History

2024-10-23 17:46:58 +00:00
import express from "express";
2024-09-12 08:11:07 +00:00
const router = express.Router();
2024-10-23 17:46:58 +00:00
import auth from "../middleware/auth.js";
import {
createProperty,
getUserProperties,
getPropertyById,
updatePropertyById,
getProperties,
addFundDetails,
getFundDetails,
} from "../controllers/property.js";
2024-09-12 08:11:07 +00:00
2024-10-23 17:46:58 +00:00
router.post("/", auth, createProperty);
router.get("/user/:userId", getUserProperties);
router.get("/:propertyId", getPropertyById);
2024-09-21 19:01:44 +00:00
router.put("/:id", updatePropertyById);
2024-10-23 17:46:58 +00:00
router.get("/", getProperties);
router.put("/:id/fund-details", addFundDetails);
router.get("/:id/fund-details", getFundDetails);
2024-09-16 15:03:26 +00:00
2024-09-12 08:11:07 +00:00
export default router;