diff --git a/src/routes/attachments.ts b/src/routes/attachments.ts index 9d20848..c387aa3 100644 --- a/src/routes/attachments.ts +++ b/src/routes/attachments.ts @@ -19,7 +19,7 @@ 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;