gothinkster / gcp-datastore-cloud-functions-realworld-example-app

Serverless GCP Cloud Functions + Datastore implementation of RealWorld Backend
https://realworld.io
145 stars 41 forks source link

Why use upsert on Create #44

Open quantuminformation opened 5 years ago

quantuminformation commented 5 years ago

If we know the user doesn't exist, why not use an insert to be more clear?

https://github.com/gothinkster/gcp-datastore-cloud-functions-realworld-example-app/blob/96ba9ce7e062906469159fd120a1241d036c93cf/src/User.js#L32