const express = require('express');
const router = express.Router({ mergeParams: true });
const BuildingsController = require('../controllers/buildings.controller');
const authenticate = require("../middleware/auth");

router
    .route('/:id')
    .get(authenticate, BuildingsController.getList)
    .post(authenticate, BuildingsController.createBuildings)
    .put(authenticate, BuildingsController.updateBuildings)
    .delete(authenticate, BuildingsController.deleteBuildings);

module.exports = router;