marketlayer / edumaps

0 stars 0 forks source link

Deprecate & remove rawUsers Service #14

Open james-cordeiro opened 8 years ago

james-cordeiro commented 8 years ago

/rawUsers service is a copy or the users without pagination. It is used for internal API purposes only for other services to make calls with pagination.

However, the users service can be called without pagination by making a call to the service and passing pagination: false as per here https://docs.feathersjs.com/databases/pagination.html

Becareful before completely deprecating and removing however, because the users service has hooks that translate the output object (the result) which another service may rely on and not be setup to recognise (for structure) as oppose to reading the rawUsers result object which is a direct correlation to the mongodb collection output

james-cordeiro commented 8 years ago

UPDATE: {paginate: false} doesn't seem to work - documentation wrong or something missing.

Use instead solution from here: https://github.com/feathersjs/feathers/issues/219

There are two options but the easiest is to simply change the ".find" service call to "._find" which will include pagination but output a result that contains "sort" and "data" properties - a caveat to look out for.