2024-09-12 08:11:07 +00:00
|
|
|
import express from 'express';
|
|
|
|
const router = express.Router();
|
|
|
|
import auth from '../middleware/auth.js';
|
2024-09-16 15:03:26 +00:00
|
|
|
import { createProperty, getUserProperties, getPropertyById } 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-16 10:55:17 +00:00
|
|
|
|
2024-09-12 08:11:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default router;
|