12 lines
420 B
JavaScript
12 lines
420 B
JavaScript
import express from 'express';
|
|
const router = express.Router();
|
|
import auth from '../middleware/auth.js';
|
|
import { createProperty, getUserProperties, getPropertyById, updatePropertyById} from '../controllers/property.js';
|
|
|
|
router.post('/', auth, createProperty);
|
|
router.get('/user/:userId', getUserProperties);
|
|
router.get('/:propertyId', getPropertyById);
|
|
router.put("/:id", updatePropertyById);
|
|
|
|
export default router;
|