summary refs log tree commit diff
path: root/api/src/routes
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-18 00:19:53 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-18 00:19:53 +0200
commit181afe7e09292f49a86f9794f9675f723378c57b (patch)
tree5ed4360f2bdf528c17b993eecafcdcb1050e6254 /api/src/routes
parent:bug: fix body parse treating null not as undefined (except for icons/avatars) (diff)
downloadserver-181afe7e09292f49a86f9794f9675f723378c57b.tar.xz
:bug: fix guild create icon
Diffstat (limited to '')
-rw-r--r--api/src/routes/guilds/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/routes/guilds/index.ts b/api/src/routes/guilds/index.ts

index 2e68d953..3612ca82 100644 --- a/api/src/routes/guilds/index.ts +++ b/api/src/routes/guilds/index.ts
@@ -1,6 +1,6 @@ import { Router, Request, Response } from "express"; import { Role, Guild, Snowflake, Config, User, Member, Channel } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { handleFile, route } from "@fosscord/api"; import { DiscordApiErrors } from "@fosscord/util"; import { ChannelModifySchema } from "../channels/#channel_id"; @@ -34,6 +34,7 @@ router.post("/", route({ body: "GuildCreateSchema" }), async (req: Request, res: await Guild.insert({ name: body.name, + icon: await handleFile(`/icons/${guild_id}`, body.icon as string), region: Config.get().regions.default, owner_id: req.user_id, afk_timeout: 300,