mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
This is the result of running `npm run format` which applies the Biome formatting rules. Rejoice!
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import { DynamicRouter, RouteAction } from "@spt/di/Router";
|
|
import { ImageRouter } from "@spt/routers/ImageRouter";
|
|
import { inject, injectable } from "tsyringe";
|
|
|
|
@injectable()
|
|
export class HttpDynamicRouter extends DynamicRouter {
|
|
constructor(@inject("ImageRouter") protected imageRouter: ImageRouter) {
|
|
super([
|
|
new RouteAction(
|
|
".jpg",
|
|
async (url: string, info: any, sessionID: string, output: string): Promise<string> => {
|
|
return this.imageRouter.getImage();
|
|
},
|
|
),
|
|
new RouteAction(
|
|
".png",
|
|
async (url: string, info: any, sessionID: string, output: string): Promise<string> => {
|
|
return this.imageRouter.getImage();
|
|
},
|
|
),
|
|
new RouteAction(
|
|
".ico",
|
|
async (url: string, info: any, sessionID: string, output: string): Promise<string> => {
|
|
return this.imageRouter.getImage();
|
|
},
|
|
),
|
|
]);
|
|
}
|
|
}
|