server/src/controllers/books.js
File books.js
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import models from '../models';
import pagination from '../controllers/helpers/pagination';
const { Categories, Books, UserBooks } = models;
Function addBook
has 65 lines of code (exceeds 60 allowed). Consider refactoring. Open
Open
addBook(req, res) {
Categories
.findOne({
where: {
id: req.body.categoryId