summary refs log tree commit diff
path: root/src/util/cdn.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/cdn.ts')
-rw-r--r--src/util/cdn.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util/cdn.ts b/src/util/cdn.ts

index fb0cfb53..b0d0f62a 100644 --- a/src/util/cdn.ts +++ b/src/util/cdn.ts
@@ -31,9 +31,10 @@ export async function handleFile(path: string, body?: string): Promise<string | const buffer = Buffer.from(body.split(",")[1], "base64"); // @ts-ignore - const { id } = await uploadFile(`/${path}/${guild_id}`, { buffer, mimetype, originalname: "banner" }); + const { id } = await uploadFile(path, { buffer, mimetype, originalname: "banner" }); return id; } catch (error) { - throw new HTTPError("Invalid " + path); + console.error(error); + throw new HTTPError("Invalid icon"); } }