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

router
    .route('/')
    .get(authenticate, ApartmentsController.getApartments)
    .post(authenticate, ApartmentsController.createApartments)
    .put(authenticate, ApartmentsController.updateApartments)
    .delete(authenticate, ApartmentsController.deleteApartments);

module.exports = router;