From 5694af2030911b92bea1b0676d4c28d87969eda7 Mon Sep 17 00:00:00 2001 From: TheSparta Date: Sun, 24 Mar 2024 17:53:04 +0000 Subject: [PATCH] Removed dead code from BundleCallbacks --- project/src/callbacks/BundleCallbacks.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/project/src/callbacks/BundleCallbacks.ts b/project/src/callbacks/BundleCallbacks.ts index 0339b9ab..28317854 100644 --- a/project/src/callbacks/BundleCallbacks.ts +++ b/project/src/callbacks/BundleCallbacks.ts @@ -3,9 +3,7 @@ import { inject, injectable } from "tsyringe"; import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; -import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @injectable() @@ -14,9 +12,7 @@ export class BundleCallbacks protected httpConfig: IHttpConfig; constructor( - @inject("WinstonLogger") protected logger: ILogger, @inject("HttpResponseUtil") protected httpResponse: HttpResponseUtil, - @inject("HttpFileUtil") protected httpFileUtil: HttpFileUtil, @inject("BundleLoader") protected bundleLoader: BundleLoader, @inject("ConfigServer") protected configServer: ConfigServer, ) @@ -24,29 +20,15 @@ export class BundleCallbacks this.httpConfig = this.configServer.getConfig(ConfigTypes.HTTP); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - public sendBundle(sessionID: string, req: any, resp: any, body: any): void - { - this.logger.info(`[BUNDLE]: ${req.url}`); - - const key = req.url.split("/bundle/")[1]; - const bundle = this.bundleLoader.getBundle(key, true); - - // send bundle - this.httpFileUtil.sendFile(resp, bundle.path); - } - /** * Handle singleplayer/bundles */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getBundles(url: string, info: any, sessionID: string): string { const local = this.httpConfig.ip === "127.0.0.1" || this.httpConfig.ip === "localhost"; return this.httpResponse.noBody(this.bundleLoader.getBundles(local)); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getBundle(url: string, info: any, sessionID: string): string { return "BUNDLE";