d13e86ba46
Rebranded src code and scripts to SPT Co-authored-by: clodan <clodan@clodan.com> Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/345 Co-authored-by: Alex <clodan@noreply.dev.sp-tarkov.com> Co-committed-by: Alex <clodan@noreply.dev.sp-tarkov.com>
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import { inject, injectable } from "tsyringe";
|
|
import { ClientLogCallbacks } from "@spt/callbacks/ClientLogCallbacks";
|
|
import { RouteAction, StaticRouter } from "@spt/di/Router";
|
|
import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData";
|
|
|
|
@injectable()
|
|
export class ClientLogStaticRouter extends StaticRouter
|
|
{
|
|
constructor(@inject("ClientLogCallbacks") protected clientLogCallbacks: ClientLogCallbacks)
|
|
{
|
|
super([
|
|
new RouteAction(
|
|
"/singleplayer/log",
|
|
async (url: string, info: any, sessionID: string, output: string): Promise<INullResponseData> =>
|
|
{
|
|
return this.clientLogCallbacks.clientLog(url, info, sessionID);
|
|
},
|
|
),
|
|
new RouteAction(
|
|
"/singleplayer/release",
|
|
async (url: string, info: any, sessionID: string, output: string): Promise<string> =>
|
|
{
|
|
return this.clientLogCallbacks.releaseNotes();
|
|
},
|
|
),
|
|
new RouteAction(
|
|
"/singleplayer/enableBSGlogging",
|
|
async (url: string, info: any, sessionID: string, output: string): Promise<string> =>
|
|
{
|
|
return this.clientLogCallbacks.bsgLogging();
|
|
},
|
|
),
|
|
]);
|
|
}
|
|
}
|