2023-03-03 16:23:46 +01:00
|
|
|
import { inject, injectable } from "tsyringe";
|
|
|
|
|
2023-10-19 19:21:17 +02:00
|
|
|
import { NotifierCallbacks } from "@spt-aki/callbacks/NotifierCallbacks";
|
|
|
|
import { RouteAction, StaticRouter } from "@spt-aki/di/Router";
|
2023-03-03 16:23:46 +01:00
|
|
|
|
|
|
|
@injectable()
|
2023-11-16 22:42:06 +01:00
|
|
|
export class NotifierStaticRouter extends StaticRouter
|
2023-03-03 16:23:46 +01:00
|
|
|
{
|
2023-11-16 22:42:06 +01:00
|
|
|
constructor(@inject("NotifierCallbacks") protected notifierCallbacks: NotifierCallbacks)
|
2023-03-03 16:23:46 +01:00
|
|
|
{
|
2023-11-16 22:42:06 +01:00
|
|
|
super([
|
|
|
|
new RouteAction(
|
|
|
|
"/client/notifier/channel/create",
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
(url: string, info: any, sessionID: string, output: string): any =>
|
|
|
|
{
|
|
|
|
return this.notifierCallbacks.createNotifierChannel(url, info, sessionID);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
new RouteAction(
|
|
|
|
"/client/game/profile/select",
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
(url: string, info: any, sessionID: string, output: string): any =>
|
|
|
|
{
|
|
|
|
return this.notifierCallbacks.selectProfile(url, info, sessionID);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
]);
|
2023-03-03 16:23:46 +01:00
|
|
|
}
|
2023-11-16 22:42:06 +01:00
|
|
|
}
|