logic/sitemaps.js
Function exports
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(app) {
const Artwork = models("Artwork");
return {
index(req, res) {
Function search
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
search(req, res) {
// Query for the artworks in Elasticsearch
Artwork.search({
bool: {
must: [