Skip to content

Instantly share code, notes, and snippets.

@Mattchewone
Last active March 9, 2018 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mattchewone/0931d8903a4bcdde675851a2e5a6e173 to your computer and use it in GitHub Desktop.
Save Mattchewone/0931d8903a4bcdde675851a2e5a6e173 to your computer and use it in GitHub Desktop.
// Hook one
module.exports = function () {
return async function doFirstThing (context) {
const { app } = context
const response = await app.service('service1').find({ query: { name: { $exists: true } }, paginate: false })
context.params.namesThatExist = response.data
return context
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment