Server/project/src/routers/static/PresetStaticRouter.ts

23 lines
786 B
TypeScript
Raw Normal View History

2023-03-03 15:23:46 +00:00
import { inject, injectable } from "tsyringe";
import { PresetBuildCallbacks } from "@spt-aki/callbacks/PresetBuildCallbacks";
import { RouteAction, StaticRouter } from "@spt-aki/di/Router";
2023-03-03 15:23:46 +00:00
@injectable()
export class PresetStaticRouter extends StaticRouter
2023-03-03 15:23:46 +00:00
{
constructor(@inject("PresetBuildCallbacks") protected presetCallbacks: PresetBuildCallbacks)
2023-03-03 15:23:46 +00:00
{
super([
new RouteAction(
"/client/handbook/builds/my/list",
// eslint-disable-next-line @typescript-eslint/no-unused-vars
(url: string, info: any, sessionID: string, output: string): any =>
{
return this.presetCallbacks.getHandbookUserlist(url, info, sessionID);
},
),
]);
2023-03-03 15:23:46 +00:00
}
}