// import necessary modules
import express from 'express';
import books from '../controllers/books';

const router = express.Router();

// Endpoint to add a book
router.post('/', books.createBook);

export default router;

// import necessary modules
import express from 'express';
import books from '../controllers/books';
import verifyToken from '../controllers/auth/verifyToken';

const router = express.Router();

// Endpoint to add a book
router.post('/', verifyToken, books.createBook);

export default router;

Add middleware to verify token
Add middleware to verify token
