🐛 fix guild create icon
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user