23 lines
613 B
JavaScript
23 lines
613 B
JavaScript
import express from "express";
|
|
const router = express.Router();
|
|
import auth from "../middleware/auth.js";
|
|
import {
|
|
createProperty,
|
|
getUserProperties,
|
|
getPropertyById,
|
|
updatePropertyById,
|
|
getProperties,
|
|
addFundDetails,
|
|
getFundDetails,
|
|
} 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);
|
|
|
|
export default router;
|