epilogue
epilogue copied to clipboard
Option to change the defaultLimit on list pulls?
If I pass /api/route?count=1000, it will get me more records than 100 on one pull, so I was wondering is there anyway to set that in a specific route, or do I have to overload the List milestone for each route I need more than 100 results for?
The reason I ask is because I have a dropdown with more than 100 options and I need to get them all in one go.
@jblaketc you can do a write.before
for the list controller and inject { count: 1000 }
to the req.params
Hmmmmm I ended up doing this:
ParamResource.list.fetch.before(function(req, res, context){
req.query.count = 10000;
return context.continue;
});
Is there a preference to do it in the write milestone on a GET list?