From 11f6a57c543858e34a5fc88dcc9148c4d44ad84f Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Sat, 25 Jun 2022 18:20:10 -0700 Subject: [PATCH] Fix types on API LiteUser --- web/pages/api/v0/_types.ts | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/web/pages/api/v0/_types.ts b/web/pages/api/v0/_types.ts index f9a66fa2..e0012c2b 100644 --- a/web/pages/api/v0/_types.ts +++ b/web/pages/api/v0/_types.ts @@ -163,8 +163,20 @@ export type LiteUser = { balance: number totalDeposits: number - totalPnLCached: number - creatorVolumeCached: number + + profitCached: { + daily: number + weekly: number + monthly: number + allTime: number + } + + creatorVolumeCached: { + daily: number + weekly: number + monthly: number + allTime: number + } } export function toLiteUser(user: User): LiteUser { @@ -181,7 +193,7 @@ export function toLiteUser(user: User): LiteUser { discordHandle, balance, totalDeposits, - totalPnLCached, + profitCached, creatorVolumeCached, } = user @@ -199,7 +211,7 @@ export function toLiteUser(user: User): LiteUser { discordHandle, balance, totalDeposits, - totalPnLCached, + profitCached, creatorVolumeCached, }) }