418d9f2a8f
- Ability to use @spt-aki path alias on the whole project. - Swapped all imports from relative paths, for imports using the path alias. Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/157 Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com> Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import { inject, injectable } from "tsyringe";
|
|
|
|
import { LocationCallbacks } from "@spt-aki/callbacks/LocationCallbacks";
|
|
import { RouteAction, StaticRouter } from "@spt-aki/di/Router";
|
|
|
|
@injectable()
|
|
export class LocationStaticRouter extends StaticRouter
|
|
{
|
|
constructor(
|
|
@inject("LocationCallbacks") protected locationCallbacks: LocationCallbacks
|
|
)
|
|
{
|
|
super(
|
|
[
|
|
new RouteAction(
|
|
"/client/locations",
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
(url: string, info: any, sessionID: string, output: string): any =>
|
|
{
|
|
return this.locationCallbacks.getLocationData(url, info, sessionID);
|
|
}
|
|
),
|
|
new RouteAction(
|
|
"/client/location/getAirdropLoot",
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
(url: string, info: any, sessionID: string, _output: string): any =>
|
|
{
|
|
return this.locationCallbacks.getAirdropLoot(url, info, sessionID);
|
|
}
|
|
)
|
|
]
|
|
);
|
|
}
|
|
} |