summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-25 23:55:19 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-25 23:55:19 +0200
commit286b4a69fd1a4a232afaea69aa29724cd7c53746 (patch)
tree3699f48e6874af5919af66e2878c5513be815a95 /util
parent:bug: message attachment url (diff)
downloadserver-286b4a69fd1a4a232afaea69aa29724cd7c53746.tar.xz
:sparkles: add private and public endpoint
Diffstat (limited to 'util')
-rw-r--r--util/src/util/cdn.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/src/util/cdn.ts b/util/src/util/cdn.ts
index 754d6244..2de23f5d 100644
--- a/util/src/util/cdn.ts
+++ b/util/src/util/cdn.ts
@@ -11,7 +11,7 @@ export async function uploadFile(path: string, file: Express.Multer.File) {
 		filename: file.originalname,
 	});
 
-	const response = await fetch(`${Config.get().cdn.endpoint || "http://localhost:3003"}${path}`, {
+	const response = await fetch(`${Config.get().cdn.endpointPrivate || "http://localhost:3003"}${path}`, {
 		headers: {
 			signature: Config.get().security.requestSignature,
 			...form.getHeaders(),
@@ -41,7 +41,7 @@ export async function handleFile(path: string, body?: string): Promise<string |
 }
 
 export async function deleteFile(path: string) {
-	const response = await fetch(`${Config.get().cdn.endpoint || "http://localhost:3003"}${path}`, {
+	const response = await fetch(`${Config.get().cdn.endpointPrivate || "http://localhost:3003"}${path}`, {
 		headers: {
 			signature: Config.get().security.requestSignature,
 		},