This repository has been archived on 2024-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Biblio/api/routes/bookRouter.js

17 lines
417 B
JavaScript

'use strict';
const express = require('express');
const router = express.Router();
const book = require('../controllers/bookController');
const requirePermission = require('../../utils/requirePermission');
router.route('/')
.get(book.list_all)
.post(requirePermission("borrow_books"), book.create);
router.route('/:bookId')
.get(book.get)
.put(book.update)
.delete(book.delete);
module.exports = router;