stockpile-co / api

The API for Stockpile, an app that manages stuff for organizations.
0 stars 1 forks source link

337/Fix create rental endpoint #338

Closed AdamVig closed 7 years ago

AdamVig commented 7 years ago

Instead of using a separate insert into query for each rental, insert all of them in a single query. This also provides the desired transactional behavior: if one rental cannot be created, then none of them will be created and the response will be an error.

Closes #337.