summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-21 15:37:16 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-21 15:37:16 +1100
commit30e65415e431e396c0092d8efad3aa82aa0a8307 (patch)
treee9addde416df18a51ab97d6d7c6c702e0bdc84e5 /src
parentFix the roles bug (diff)
downloadserver-30e65415e431e396c0092d8efad3aa82aa0a8307.tar.xz
Set default cdn endpoints so that local testing works
Diffstat (limited to 'src')
-rw-r--r--src/api/routes/channels/#channel_id/messages/index.ts2
-rw-r--r--src/util/config/types/CdnConfiguration.ts3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/api/routes/channels/#channel_id/messages/index.ts b/src/api/routes/channels/#channel_id/messages/index.ts
index 86864edb..523b0cf8 100644
--- a/src/api/routes/channels/#channel_id/messages/index.ts
+++ b/src/api/routes/channels/#channel_id/messages/index.ts
@@ -247,7 +247,7 @@ router.post(
 					Attachment.create({ ...file, proxy_url: file.url }),
 				);
 			} catch (error) {
-				return res.status(400).json(error);
+				return res.status(400).json({ message: error!.toString() })
 			}
 		}
 
diff --git a/src/util/config/types/CdnConfiguration.ts b/src/util/config/types/CdnConfiguration.ts
index f58c1c64..3c4dd163 100644
--- a/src/util/config/types/CdnConfiguration.ts
+++ b/src/util/config/types/CdnConfiguration.ts
@@ -4,4 +4,7 @@ export class CdnConfiguration extends EndpointConfiguration {
 	resizeHeightMax: number = 1000;
 	resizeWidthMax: number = 1000;
 	imagorServerUrl: string | null = null;
+
+	endpointPublic: string | null = "http://localhost:3001";
+	endpointPrivate: string | null = "http://localhost:3001";
 }
\ No newline at end of file