diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-07-31 13:27:15 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-07-31 15:01:19 +0200 |
commit | 6e9bd98711f488dd06d2ce93027f8d9ea4cd3ad5 (patch) | |
tree | 8a37ed24e9181b6f464974a884a6087d306137ec /api | |
parent | Add local disk caching for fetched assets (diff) | |
download | server-6e9bd98711f488dd06d2ce93027f8d9ea4cd3ad5.tar.xz |
Make requested changes (pr792)
Diffstat (limited to 'api')
-rw-r--r-- | api/src/middlewares/TestClient.ts | 1 | ||||
-rw-r--r-- | api/src/util/entities/AssetCacheItem.ts | 15 |
2 files changed, 1 insertions, 15 deletions
diff --git a/api/src/middlewares/TestClient.ts b/api/src/middlewares/TestClient.ts index e52a5e59..7292868c 100644 --- a/api/src/middlewares/TestClient.ts +++ b/api/src/middlewares/TestClient.ts @@ -27,7 +27,6 @@ export default function TestClient(app: Application) { newAssetCache = new Map<string, AssetCacheItem>(Object.entries(JSON.parse(rawdata.toString()))); } - //define routes app.use("/assets", express.static(path.join(__dirname, "..", "..", "assets"))); app.get("/assets/:file", async (req: Request, res: Response) => { delete req.headers.host; diff --git a/api/src/util/entities/AssetCacheItem.ts b/api/src/util/entities/AssetCacheItem.ts index 7fb4e1e6..160dece6 100644 --- a/api/src/util/entities/AssetCacheItem.ts +++ b/api/src/util/entities/AssetCacheItem.ts @@ -1,16 +1,3 @@ -import { Headers } from "node-fetch"; - export class AssetCacheItem { - public Key: string; - public FilePath: string; - public Headers: any; - - constructor(key: string){ - this.Key = key; - } - /*constructor(key: string, filePath: string, headers: Headers) { - this.Key = key; - this.FilePath = filePath; - this.Headers = headers; - }*/ + constructor(public Key: string, public FilePath: string = "", public Headers: any = null as any) {} } \ No newline at end of file |