routes/upload.js
Function prepareMiddleware
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
prepareMiddleware() {
const middleware = express();
middleware.use(bodyParser.json());
middleware.post('/upload', (req, res) => {
const { name, type } = req.body;