add missing props on models, add additional info to miniprofiles

This commit is contained in:
CWX 2024-07-21 20:41:46 +01:00
parent 9df6357f62
commit 0e85e55ced
4 changed files with 12 additions and 9 deletions

View File

@ -95,6 +95,8 @@ export class ProfileController
prevexp: 0, prevexp: 0,
nextlvl: 0, nextlvl: 0,
maxlvl: maxlvl, maxlvl: maxlvl,
edition: profile.info?.edition ?? "",
profileId: profile.info?.id ?? "",
sptData: this.profileHelper.getDefaultSptDataObject(), sptData: this.profileHelper.getDefaultSptDataObject(),
}; };
} }
@ -112,6 +114,8 @@ export class ProfileController
: this.profileHelper.getExperience(currlvl), : this.profileHelper.getExperience(currlvl),
nextlvl: nextlvl, nextlvl: nextlvl,
maxlvl: maxlvl, maxlvl: maxlvl,
edition: profile.info?.edition ?? "",
profileId: profile.info?.id ?? "",
sptData: profile.spt, sptData: profile.spt,
}; };
} }

View File

@ -54,7 +54,7 @@ export class TradeController
@inject("HashUtil") protected hashUtil: HashUtil, @inject("HashUtil") protected hashUtil: HashUtil,
@inject("ItemHelper") protected itemHelper: ItemHelper, @inject("ItemHelper") protected itemHelper: ItemHelper,
@inject("ProfileHelper") protected profileHelper: ProfileHelper, @inject("ProfileHelper") protected profileHelper: ProfileHelper,
@inject("ragfairOfferHelper") protected ragfairOfferHelper: RagfairOfferHelper, @inject("RagfairOfferHelper") protected ragfairOfferHelper: RagfairOfferHelper,
@inject("TraderHelper") protected traderHelper: TraderHelper, @inject("TraderHelper") protected traderHelper: TraderHelper,
@inject("RagfairServer") protected ragfairServer: RagfairServer, @inject("RagfairServer") protected ragfairServer: RagfairServer,
@inject("HttpResponseUtil") protected httpResponse: HttpResponseUtil, @inject("HttpResponseUtil") protected httpResponse: HttpResponseUtil,

View File

@ -1,3 +1,5 @@
import { Spt } from "../profile/ISptProfile"
export interface IMiniProfile export interface IMiniProfile
{ {
username: string username: string
@ -8,10 +10,7 @@ export interface IMiniProfile
prevexp: number prevexp: number
nextlvl: number nextlvl: number
maxlvl: number maxlvl: number
sptData: SPTData edition: string
} profileId: string
sptData: Spt
export interface SPTData
{
version: string
} }

View File

@ -213,11 +213,11 @@ export interface Spt
/** What mods has this profile loaded at any point in time */ /** What mods has this profile loaded at any point in time */
mods?: ModDetails[] mods?: ModDetails[]
/** What gifts has this profile received and how many */ /** What gifts has this profile received and how many */
receivedGifts: ReceivedGift[] receivedGifts?: ReceivedGift[]
/** item TPLs blacklisted from being sold on flea for this profile */ /** item TPLs blacklisted from being sold on flea for this profile */
blacklistedItemTpls?: string[] blacklistedItemTpls?: string[]
/** key: daily type */ /** key: daily type */
freeRepeatableRefreshUsedCount: Record<string, number> freeRepeatableRefreshUsedCount?: Record<string, number>
} }
export interface ModDetails export interface ModDetails