mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Needs merged with: SPT-AKI/Modules#96 Read details there. Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com> Reviewed-on: SPT-AKI/Server#262 Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com> Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import { inject, injectable } from "tsyringe";
|
|
|
|
import { ClientLogCallbacks } from "@spt-aki/callbacks/ClientLogCallbacks";
|
|
import { RouteAction, StaticRouter } from "@spt-aki/di/Router";
|
|
|
|
@injectable()
|
|
export class ClientLogStaticRouter extends StaticRouter
|
|
{
|
|
constructor(@inject("ClientLogCallbacks") protected clientLogCallbacks: ClientLogCallbacks)
|
|
{
|
|
super([
|
|
new RouteAction("/singleplayer/log", (url: string, info: any, sessionID: string, output: string): any =>
|
|
{
|
|
return this.clientLogCallbacks.clientLog(url, info, sessionID);
|
|
}),
|
|
new RouteAction("/singleplayer/release", (url: string, info: any, sessionID: string, output: string) =>
|
|
{
|
|
return this.clientLogCallbacks.releaseNotes();
|
|
}),
|
|
new RouteAction(
|
|
"/singleplayer/enableBSGlogging",
|
|
(url: string, info: any, sessionID: string, output: string) =>
|
|
{
|
|
return this.clientLogCallbacks.bsgLogging();
|
|
},
|
|
),
|
|
]);
|
|
}
|
|
}
|