add client prefix to weaponskins for clarity

This commit is contained in:
Ordis 2024-06-22 23:18:36 +02:00
parent b691bba6c7
commit e4f308e4fe
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ import {
ISeasonChallenge, ISeasonChallenge,
ITypeCount, ITypeCount,
InventorySlot, InventorySlot,
IWeaponSkin IWeaponSkinClient
} from "@/src/types/inventoryTypes/inventoryTypes"; } from "@/src/types/inventoryTypes/inventoryTypes";
import { IGenericUpdate } from "../types/genericUpdate"; import { IGenericUpdate } from "../types/genericUpdate";
import { import {
@ -458,7 +458,7 @@ export const addCustomization = async (customizatonName: string, accountId: stri
return changedInventory.FlavourItems[flavourItemIndex].toJSON(); return changedInventory.FlavourItems[flavourItemIndex].toJSON();
}; };
export const addSkin = async (typeName: string, accountId: string): Promise<IWeaponSkin> => { export const addSkin = async (typeName: string, accountId: string): Promise<IWeaponSkinClient> => {
const inventory = await getInventory(accountId); const inventory = await getInventory(accountId);
const index = inventory.WeaponSkins.push({ ItemType: typeName }) - 1; const index = inventory.WeaponSkins.push({ ItemType: typeName }) - 1;
const changedInventory = await inventory.save(); const changedInventory = await inventory.save();

View File

@ -138,7 +138,7 @@ export interface IInventoryResponse {
LastRegionPlayed: string; LastRegionPlayed: string;
XPInfo: ITypeXPItem[]; XPInfo: ITypeXPItem[];
Recipes: ITypeCount[]; Recipes: ITypeCount[];
WeaponSkins: IWeaponSkin[]; WeaponSkins: IWeaponSkinClient[];
PendingRecipes: IPendingRecipeResponse[]; PendingRecipes: IPendingRecipeResponse[];
TrainingDate: IMongoDate; TrainingDate: IMongoDate;
PlayerLevel: number; PlayerLevel: number;
@ -852,7 +852,7 @@ export interface IWeaponSkinDatabase {
ItemType: string; ItemType: string;
} }
export interface IWeaponSkin extends IWeaponSkinDatabase { export interface IWeaponSkinClient extends IWeaponSkinDatabase {
ItemId: IOid; ItemId: IOid;
} }