mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Rebranded src code and scripts to SPT Co-authored-by: clodan <clodan@clodan.com> Reviewed-on: SPT-AKI/Server#345 Co-authored-by: Alex <clodan@noreply.dev.sp-tarkov.com> Co-committed-by: Alex <clodan@noreply.dev.sp-tarkov.com>
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
import { inject, injectable } from "tsyringe";
|
|
import { NotifierCallbacks } from "@spt/callbacks/NotifierCallbacks";
|
|
import { RouteAction, StaticRouter } from "@spt/di/Router";
|
|
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
|
import { INotifierChannel } from "@spt/models/eft/notifier/INotifier";
|
|
import { ISelectProfileResponse } from "@spt/models/eft/notifier/ISelectProfileResponse";
|
|
|
|
@injectable()
|
|
export class NotifierStaticRouter extends StaticRouter
|
|
{
|
|
constructor(@inject("NotifierCallbacks") protected notifierCallbacks: NotifierCallbacks)
|
|
{
|
|
super([
|
|
new RouteAction(
|
|
"/client/notifier/channel/create",
|
|
async (
|
|
url: string,
|
|
info: any,
|
|
sessionID: string,
|
|
output: string,
|
|
): Promise<IGetBodyResponseData<INotifierChannel>> =>
|
|
{
|
|
return this.notifierCallbacks.createNotifierChannel(url, info, sessionID);
|
|
},
|
|
),
|
|
new RouteAction(
|
|
"/client/game/profile/select",
|
|
async (
|
|
url: string,
|
|
info: any,
|
|
sessionID: string,
|
|
output: string,
|
|
): Promise<IGetBodyResponseData<ISelectProfileResponse>> =>
|
|
{
|
|
return this.notifierCallbacks.selectProfile(url, info, sessionID);
|
|
},
|
|
),
|
|
]);
|
|
}
|
|
}
|