Remove fallback URIs, remove endpointClient, expose admin api

This commit is contained in:
Rory& committed 2025-12-04 11:01:18 +01:00
1 parent e981f491b7
commit 13bbf5dbd5
11 files changed
+22 -27

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ router.post("/:channel_id", multer.single("file"), async (req: Request, res: Res
const id = Snowflake.generate();
const path = `attachments/${channel_id}/${id}/${filename}`;
const endpoint = Config.get()?.cdn.endpointPublic || "http://localhost:3001";
const endpoint = Config.get()?.cdn.endpointPublic;
await storage.set(path, buffer);
let width;
+1 -2
View File
@@ -62,8 +62,7 @@ router.post(
if (ANIMATED_MIME_TYPES.includes(type.mime)) hash = `a_${hash}`; // animated icons have a_ infront of the hash
const path = `avatars/${user_id}/${hash}`;
const endpoint =
Config.get().cdn.endpointPublic || "http://localhost:3001";
const endpoint = Config.get().cdn.endpointPublic;
await storage.set(path, buffer);
+1 -1
View File
@@ -59,7 +59,7 @@ router.post("/", multer.single("file"), async (req: Request, res: Response) => {
if (ANIMATED_MIME_TYPES.includes(type.mime)) hash = `a_${hash}`; // animated icons have a_ infront of the hash
const path = `guilds/${guild_id}/users/${user_id}/avatars/${hash}`;
const endpoint = Config.get().cdn.endpointPublic || "http://localhost:3001";
const endpoint = Config.get().cdn.endpointPublic;
await storage.set(path, buffer);
+1 -2
View File
@@ -61,8 +61,7 @@ router.post(
throw new HTTPError("Invalid file type");
const path = `role-icons/${role_id}/${hash}.png`;
const endpoint =
Config.get().cdn.endpointPublic || "http://localhost:3001";
const endpoint = Config.get().cdn.endpointPublic;
await storage.set(path, buffer);