2023-03-03 16:23:46 +01:00
|
|
|
import { inject, injectable } from "tsyringe";
|
|
|
|
|
2023-10-19 19:21:17 +02:00
|
|
|
import { WishlistController } from "@spt-aki/controllers/WishlistController";
|
|
|
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
|
|
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
|
|
|
import { IWishlistActionData } from "@spt-aki/models/eft/wishlist/IWishlistActionData";
|
2023-03-03 16:23:46 +01:00
|
|
|
|
|
|
|
@injectable()
|
|
|
|
export class WishlistCallbacks
|
|
|
|
{
|
|
|
|
constructor(
|
|
|
|
@inject("WishlistController") protected wishlistController: WishlistController)
|
|
|
|
{ }
|
|
|
|
|
2023-07-15 15:49:25 +02:00
|
|
|
/** Handle AddToWishList event */
|
2023-03-03 16:23:46 +01:00
|
|
|
public addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse
|
|
|
|
{
|
|
|
|
return this.wishlistController.addToWishList(pmcData, body, sessionID);
|
|
|
|
}
|
|
|
|
|
2023-07-15 15:49:25 +02:00
|
|
|
/** Handle RemoveFromWishList event */
|
2023-03-03 16:23:46 +01:00
|
|
|
public removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse
|
|
|
|
{
|
|
|
|
return this.wishlistController.removeFromWishList(pmcData, body, sessionID);
|
|
|
|
}
|
|
|
|
}
|