Create custom query with Mongoose

The problem was in routes.json. Basically seems like Strapi doesn’t like the slash / following the collection name for custom queries (maybe someone can explain to me why? and if there’s a workaround?), so instead of /people/alldesc I tried /people-alldesc and it worked.

Also in the service there’s no need for return result.map((entry) => entry.toObject());, that causes anther error, simply doing return result works.