mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
catch for missing config error
This commit is contained in:
parent
e8052ce7fc
commit
522c6f8b26
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user