Return data as camelCase
This commit is contained in:
parent
27bd95aa11
commit
d110fba3ff
@ -6,6 +6,9 @@
|
||||
"resourceMinStartAmount": 50,
|
||||
"resourceMaxStartAmount": 200
|
||||
},
|
||||
"items": {
|
||||
"maxItemUpgrade": 5
|
||||
},
|
||||
"store": [
|
||||
{
|
||||
"id": "item1",
|
||||
|
@ -27,8 +27,8 @@ export default async function handler(
|
||||
source.resourceWells = resourceWells;
|
||||
const stakesSql = `
|
||||
SELECT staking_event.id, resname as resourceType, source_id as stakingSourceId,
|
||||
inventory_item_id, duration_in_mins, stake_amount,
|
||||
staking_event.created_at as startTime
|
||||
inventory_item_id as inventoryItemId, duration_in_mins as durationInMins,
|
||||
stake_amount as stakeAmount, staking_event.created_at as startTime
|
||||
FROM staking_event
|
||||
INNER JOIN resource_well ON well_id = resource_well.id
|
||||
INNER JOIN staking_source ON source_id = staking_source.id
|
||||
|
@ -44,7 +44,7 @@ GET http://localhost:3000/api/user/1/stakes/
|
||||
# Start a stake
|
||||
POST http://localhost:3000/api/user/1/stakes/start
|
||||
:headers
|
||||
{ "inventoryItemId": "item1", "wellId": 7 }
|
||||
{ "inventoryItemId": 1, "wellId": 1 }
|
||||
|
||||
# Claim a stake
|
||||
POST http://localhost:3000/api/user/1/stakes/claim
|
||||
|
2
typings.d.ts
vendored
2
typings.d.ts
vendored
@ -23,7 +23,7 @@ export interface IStake {
|
||||
inventoryItemId: number;
|
||||
stakeAmount: number;
|
||||
durationInMins: number;
|
||||
unclaimed: boolean;
|
||||
unclaimed: boolean | undefined;
|
||||
claimable: boolean | undefined
|
||||
remainingTime: number | undefined
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user