feat: implement purchasing of skins #353

Merged
Sainan merged 4 commits from buy-skins into main 2024-06-22 14:19:07 -07:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit e4f308e4fe - Show all commits

View File

@ -14,7 +14,7 @@ import {
ISeasonChallenge,
ITypeCount,
InventorySlot,
IWeaponSkin
IWeaponSkinClient
} from "@/src/types/inventoryTypes/inventoryTypes";
import { IGenericUpdate } from "../types/genericUpdate";
import {
@ -458,7 +458,7 @@ export const addCustomization = async (customizatonName: string, accountId: stri
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 index = inventory.WeaponSkins.push({ ItemType: typeName }) - 1;
const changedInventory = await inventory.save();

View File

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