const express = require('express');
const router = express.Router();
const HomesteadController = require('../controllers/homesteads.controller');
const authenticate = require("../middleware/auth");

router
    .route('/list')
    .get(authenticate, HomesteadController.getList)

router
    .route('/:homestead_id')
    .get(authenticate, HomesteadController.getHomestead)
    .put(authenticate, HomesteadController.updateHomestead)
    .delete(authenticate, HomesteadController.deleteHomestead);

router
    .route('/')
    .post(authenticate, HomesteadController.createHomestead);

module.exports = router;