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