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

router
    .route('/list/entrances')
    .get(authenticate, HousesController.getListEntrance)

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

router
    .route('/:house_id')
    .get(authenticate, HousesController.getHouse)
    .put(authenticate, HousesController.updateHouse)
    .delete(authenticate, HousesController.deleteHouse);

router
    .route('/')
    .post(authenticate, HousesController.createHouse);

module.exports = router;