Skip to content

Instantly share code, notes, and snippets.

@marshallswain
Last active July 8, 2017 04:08
Show Gist options
  • Save marshallswain/af280e77b2587cd0f90b97136b2c4abb to your computer and use it in GitHub Desktop.
Save marshallswain/af280e77b2587cd0f90b97136b2c4abb to your computer and use it in GitHub Desktop.
Upserting with feathers-mongoose's `patch` method
const data = { address: '1', identifier: 'some-identifier' }
const params = {
query: { address: '1' },
mongoose: { upsert: true }
}
app.service('address-meta').patch(null, data, params)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment