Working create_transaction endpoint

Creates the transaction record and updates the merchandise quantity in one db transaction.

Managed to do the merchandise update in one UPDATE query, but the error that's thrown when an item to buy is not found is pretty confusing, so I convert it to a 404.

I also added some DB indexes.
This commit is contained in:
2020-10-31 20:34:20 -04:00
parent c87c35021e
commit 08c8dcb07b
16 changed files with 249 additions and 167 deletions

View File

@@ -1,7 +1,11 @@
{
"shop_id": 1,
"mod_name": "Skyrim.esm",
"local_form_id": 1,
"local_form_id": 5,
"name": "New Thing",
"form_type": 41,
"is_food": false,
"price": 100,
"is_sell": false,
"quantity": 1,
"amount": 100