estatesfunding/ef-api/routes/property.js

12 lines
420 B
JavaScript
Raw Normal View History

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