From 6142dcae20eef7b864c3c495436e4c510a661c1a Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 30 Aug 2022 17:05:38 +0200 Subject: testing stuff --- src/api/routes/guilds/#guild_id/widget.png.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api/routes/guilds') diff --git a/src/api/routes/guilds/#guild_id/widget.png.ts b/src/api/routes/guilds/#guild_id/widget.png.ts index 1c4ef29b..2b647276 100644 --- a/src/api/routes/guilds/#guild_id/widget.png.ts +++ b/src/api/routes/guilds/#guild_id/widget.png.ts @@ -1,5 +1,5 @@ import { route } from "@fosscord/api"; -import { Guild, HTTPError } from "@fosscord/util"; +import { Guild, HTTPError, Paths } from "@fosscord/util"; import { Request, Response, Router } from "express"; import fs from "fs"; import path from "path"; @@ -39,7 +39,7 @@ router.get("/", route({}), async (req: Request, res: Response) => { } // TODO: Widget style templates need Fosscord branding - const source = path.join(__dirname, "..", "..", "..", "..", "..", "assets", "widget", `${style}.png`); + const source = path.join(Paths.AssetsPath, "widget", `${style}.png`); if (!fs.existsSync(source)) { throw new HTTPError("Widget template does not exist.", 400); } -- cgit 1.5.1