Handle null when item hasn't been upgraded
This commit is contained in:
parent
6c1ac1838f
commit
b965371fe5
@ -396,7 +396,7 @@ begin
|
|||||||
raise exception 'Unable to find an inventory item that is owned and not actively staked';
|
raise exception 'Unable to find an inventory item that is owned and not actively staked';
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
select claim_amount + claim_boost
|
select claim_amount + coalesce(claim_boost, 0)
|
||||||
into total_stake_amount
|
into total_stake_amount
|
||||||
from inventory_item
|
from inventory_item
|
||||||
join store_item on inventory_item.store_item_id = store_item.id
|
join store_item on inventory_item.store_item_id = store_item.id
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
#
|
#
|
||||||
:user_id = 595ab570-fa74-4c6c-980e-4c80d1064dd1
|
:user_id = 595ab570-fa74-4c6c-980e-4c80d1064dd1
|
||||||
|
:host = https://moonminers.app/api
|
||||||
|
|
||||||
# Seed the SQLite database (deprecated)
|
# Seed the SQLite database (deprecated)
|
||||||
GET http://localhost:3000/api/seed
|
GET http://localhost:3000/api/seed
|
||||||
@ -11,8 +12,12 @@ GET http://localhost:3000/api/seed
|
|||||||
POST http://localhost:3000/api/import-config
|
POST http://localhost:3000/api/import-config
|
||||||
:headers
|
:headers
|
||||||
|
|
||||||
|
# Get leaderboards
|
||||||
|
GET :host/leaderboards
|
||||||
|
:headers
|
||||||
|
|
||||||
# Get Inventory Items
|
# Get Inventory Items
|
||||||
POST http://localhost:3000/api/user/login
|
POST :host/user/login
|
||||||
:headers
|
:headers
|
||||||
{ "wallet" : "Wallet12345678" }
|
{ "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
|
POST http://localhost:3000/api/user/:user_id/clear-data
|
||||||
:headers
|
:headers
|
||||||
|
|
||||||
# Get leaderboards
|
|
||||||
GET http://localhost:3000/api/leaderboards
|
|
||||||
:headers
|
|
||||||
|
|
||||||
# Get game config
|
# Get game config
|
||||||
GET http://localhost:3000/api/get-game-config
|
GET http://localhost:3000/api/get-game-config
|
||||||
:headers
|
:headers
|
||||||
@ -77,8 +78,8 @@ GET http://localhost:3000/api/user/:user_id/stakes/
|
|||||||
# Start a stake
|
# Start a stake
|
||||||
POST http://localhost:3000/api/user/:user_id/stakes/start
|
POST http://localhost:3000/api/user/:user_id/stakes/start
|
||||||
:headers
|
:headers
|
||||||
{ "inventoryItemId": "2bd5f846-ce1d-45be-998e-26d2e97b7f68"
|
{ "inventoryItemId": "1db181dd-320f-4525-a00d-933e5d72d690"
|
||||||
, "wellId": "588ad177-83ca-4a5f-9672-bf97783ea42f" }
|
, "wellId": "0a7fd54d-02cf-4c08-b106-6f812ad4b1ca" }
|
||||||
|
|
||||||
# Claim a stake
|
# Claim a stake
|
||||||
POST http://localhost:3000/api/user/:user_id/stakes/claim
|
POST http://localhost:3000/api/user/:user_id/stakes/claim
|
||||||
|
Loading…
x
Reference in New Issue
Block a user