diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-26 22:08:14 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-26 22:08:14 +1000 |
commit | 849b257db7d43c2f1d13d9620ce7f6ba9dfd3e50 (patch) | |
tree | 37c9af175c98116a0f48ca2d5c8b74f291b3ce85 /src/api/routes/guilds/templates/index.ts | |
parent | Fix scripts/benchmark/connections.js (diff) | |
download | server-849b257db7d43c2f1d13d9620ce7f6ba9dfd3e50.tar.xz |
Move schemas to /src/util/schemas
Diffstat (limited to 'src/api/routes/guilds/templates/index.ts')
-rw-r--r-- | src/api/routes/guilds/templates/index.ts | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/api/routes/guilds/templates/index.ts b/src/api/routes/guilds/templates/index.ts index e281214f..4e7abcc5 100644 --- a/src/api/routes/guilds/templates/index.ts +++ b/src/api/routes/guilds/templates/index.ts @@ -1,15 +1,10 @@ import { Request, Response, Router } from "express"; -import { Template, Guild, Role, Snowflake, Config, User, Member } from "@fosscord/util"; +import { Template, Guild, Role, Snowflake, Config, Member, GuildTemplateCreateSchema } from "@fosscord/util"; import { route } from "@fosscord/api"; import { DiscordApiErrors } from "@fosscord/util"; import fetch from "node-fetch"; const router: Router = Router(); -export interface GuildTemplateCreateSchema { - name: string; - avatar?: string | null; -} - router.get("/:code", route({}), async (req: Request, res: Response) => { const { allowDiscordTemplates, allowRaws, enabled } = Config.get().templates; if (!enabled) res.json({ code: 403, message: "Template creation & usage is disabled on this instance." }).sendStatus(403); |