Propose a `makePaginatedMethod` function to work w/ `usePaginatedMethod` hook
- Have a serverside function that allow to easily generate paginated methods that would work ootb with
usePaginatedMethod
- It should be extendable in order to have the possibility to customize the query according to the user rights
Relates to #203 (closed)
Might look like :
makePaginatedMethod({
mixins?: function[], // a list of mixins to apply before executing the method
collection: Meteor.Collection,
name?: string, // default to `${collection.name}s.find`,
hooks?: (function(...ctx){})[] // a list of hooks that mutate the query
})
Edited by David Panart