summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/routes/attachments.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/attachments.ts b/src/routes/attachments.ts

index 9d208485..c387aa37 100644 --- a/src/routes/attachments.ts +++ b/src/routes/attachments.ts
@@ -19,7 +19,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.endpoint || "http://localhost:3003"; + const endpoint = Config.get()?.cdn.endpoint || "http://localhost:3003"; await storage.set(path, buffer); var width;