diff --git a/sql/procedures.sql b/sql/procedures.sql index e807e55..5c9580e 100644 --- a/sql/procedures.sql +++ b/sql/procedures.sql @@ -396,7 +396,7 @@ begin raise exception 'Unable to find an inventory item that is owned and not actively staked'; end if; - select claim_amount + claim_boost + select claim_amount + coalesce(claim_boost, 0) into total_stake_amount from inventory_item join store_item on inventory_item.store_item_id = store_item.id diff --git a/test-endpoints.restclient b/test-endpoints.restclient index 2dddf3c..0445733 100644 --- a/test-endpoints.restclient +++ b/test-endpoints.restclient @@ -2,6 +2,7 @@ Content-Type: application/json # :user_id = 595ab570-fa74-4c6c-980e-4c80d1064dd1 +:host = https://moonminers.app/api # Seed the SQLite database (deprecated) GET http://localhost:3000/api/seed @@ -11,8 +12,12 @@ GET http://localhost:3000/api/seed POST http://localhost:3000/api/import-config :headers +# Get leaderboards +GET :host/leaderboards +:headers + # Get Inventory Items -POST http://localhost:3000/api/user/login +POST :host/user/login :headers { "wallet" : "Wallet12345678" } @@ -40,10 +45,6 @@ PUT http://localhost:3000/api/user/:user_id/account POST http://localhost:3000/api/user/:user_id/clear-data :headers -# Get leaderboards -GET http://localhost:3000/api/leaderboards -:headers - # Get game config GET http://localhost:3000/api/get-game-config :headers @@ -77,8 +78,8 @@ GET http://localhost:3000/api/user/:user_id/stakes/ # Start a stake POST http://localhost:3000/api/user/:user_id/stakes/start :headers -{ "inventoryItemId": "2bd5f846-ce1d-45be-998e-26d2e97b7f68" - , "wellId": "588ad177-83ca-4a5f-9672-bf97783ea42f" } +{ "inventoryItemId": "1db181dd-320f-4525-a00d-933e5d72d690" + , "wellId": "0a7fd54d-02cf-4c08-b106-6f812ad4b1ca" } # Claim a stake POST http://localhost:3000/api/user/:user_id/stakes/claim