Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upsert feature #11

Open
giulianok opened this issue Oct 17, 2017 · 0 comments
Open

Upsert feature #11

giulianok opened this issue Oct 17, 2017 · 0 comments

Comments

@giulianok
Copy link
Contributor

Add upsert feature to avoid code like this:

let createTopicAndUpdateRequest = async request => {
  let topic = await service.API(Topic.type).create({})
  let data = {
    id: request.id,
    topic: topic.id,
  }
  await service.API(Request.type).update(data)
  return topic
}

https://github.com/smartprocure/marketplace/pull/2286#discussion_r144929422

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant