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

index 8860bcdf..17ade355 100644 --- a/src/routes/guilds/index.ts +++ b/src/routes/guilds/index.ts
@@ -1,9 +1,8 @@ import { Router, Request, Response } from "express"; -import { RoleModel, GuildModel, Snowflake, Guild, RoleDocument } from "@fosscord/server-util"; +import { RoleModel, GuildModel, Snowflake, Guild, RoleDocument, Config } from "@fosscord/server-util"; import { HTTPError } from "lambert-server"; import { check } from "./../../util/instanceOf"; import { GuildCreateSchema } from "../../schema/Guild"; -import * as Config from "../../util/Config"; import { getPublicUser } from "../../util/User"; import { addMember } from "../../util/Member"; import { createChannel } from "../../util/Channel"; @@ -15,7 +14,7 @@ const router: Router = Router(); router.post("/", check(GuildCreateSchema), async (req: Request, res: Response) => { const body = req.body as GuildCreateSchema; - const { maxGuilds } = Config.apiConfig.getAll().limits.user; + const { maxGuilds } = Config.get().limits.user; const user = await getPublicUser(req.user_id, { guilds: true }); if (user.guilds.length >= maxGuilds) {