0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00
server/project/src/routers/static/WeatherStaticRouter.ts

19 lines
611 B
TypeScript
Raw Normal View History

2023-03-03 15:23:46 +00:00
import { inject, injectable } from "tsyringe";
import { WeatherCallbacks } from "@spt-aki/callbacks/WeatherCallbacks";
import { RouteAction, StaticRouter } from "@spt-aki/di/Router";
2023-03-03 15:23:46 +00:00
@injectable()
2023-11-13 11:12:17 -05:00
export class WeatherStaticRouter extends StaticRouter
2023-03-03 15:23:46 +00:00
{
constructor(@inject("WeatherCallbacks") protected weatherCallbacks: WeatherCallbacks)
2023-03-03 15:23:46 +00:00
{
super([
new RouteAction("/client/weather", (url: string, info: any, sessionID: string, output: string): any =>
{
return this.weatherCallbacks.getWeather(url, info, sessionID);
}),
]);
2023-03-03 15:23:46 +00:00
}
2023-11-13 11:12:17 -05:00
}