0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00
server/project/src/callbacks/PrestigeCallbacks.ts
Chomp 089cf2f2b0 Updated JSONS and matching interfaces
updated ragman clothing

Updated quests

Updated trader assorts

Updated location servcies

Added new prestige data + new classes to handle new endpoints

Added new hideout customisation endpoint
2024-12-26 20:54:19 +00:00

37 lines
1.5 KiB
TypeScript

import type { PrestigeController } from "@spt/controllers/PrestigeController";
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
import type { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
import type { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
import type { INotifierChannel } from "@spt/models/eft/notifier/INotifier";
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
import { JsonUtil } from "@spt/utils/JsonUtil";
import { inject, injectable } from "tsyringe";
@injectable()
export class PrestigeCallbacks {
constructor(
@inject("HttpServerHelper") protected httpServerHelper: HttpServerHelper,
@inject("HttpResponseUtil") protected httpResponse: HttpResponseUtil,
@inject("JsonUtil") protected jsonUtil: JsonUtil,
@inject("PrestigeController") protected prestigeController: PrestigeController,
) {}
/** Handle client/prestige/list */
public getPrestige(
url: string,
info: IEmptyRequestData,
sessionID: string,
): IGetBodyResponseData<INotifierChannel> {
return this.httpResponse.getBody(this.prestigeController.getPrestige(sessionID, info));
}
/** Handle client/prestige/obtain */
public obtainPrestige(
url: string,
info: IEmptyRequestData,
sessionID: string,
): IGetBodyResponseData<INotifierChannel> {
return this.httpResponse.getBody(this.prestigeController.obtainPrestige(sessionID, info));
}
}