diff options
Diffstat (limited to 'src/api/routes')
-rw-r--r-- | src/api/routes/channels/#channel_id/permissions.ts | 6 | ||||
-rw-r--r-- | src/api/routes/guilds/#guild_id/index.ts | 18 | ||||
-rw-r--r-- | src/api/routes/users/@me/settings.ts | 2 |
3 files changed, 2 insertions, 24 deletions
diff --git a/src/api/routes/channels/#channel_id/permissions.ts b/src/api/routes/channels/#channel_id/permissions.ts index 89be843f..0a816223 100644 --- a/src/api/routes/channels/#channel_id/permissions.ts +++ b/src/api/routes/channels/#channel_id/permissions.ts @@ -1,12 +1,11 @@ import { Channel, ChannelPermissionOverwrite, - ChannelPermissionOverwriteType, ChannelUpdateEvent, emitEvent, - getPermission, Member, Role, + ChannelPermissionOverwriteSchema } from "@fosscord/util"; import { Router, Response, Request } from "express"; import { HTTPError } from "lambert-server"; @@ -16,9 +15,6 @@ const router: Router = Router(); // TODO: Only permissions your bot has in the guild or channel can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel) -export interface ChannelPermissionOverwriteSchema - extends ChannelPermissionOverwrite {} - router.put( "/:overwrite_id", route({ diff --git a/src/api/routes/guilds/#guild_id/index.ts b/src/api/routes/guilds/#guild_id/index.ts index 715a3835..04cb76c2 100644 --- a/src/api/routes/guilds/#guild_id/index.ts +++ b/src/api/routes/guilds/#guild_id/index.ts @@ -8,29 +8,13 @@ import { GuildUpdateEvent, handleFile, Member, - GuildCreateSchema, + GuildUpdateSchema, } from "@fosscord/util"; import { HTTPError } from "lambert-server"; import { route } from "@fosscord/api"; const router = Router(); -export interface GuildUpdateSchema extends Omit<GuildCreateSchema, "channels"> { - banner?: string | null; - splash?: string | null; - description?: string; - features?: string[]; - verification_level?: number; - default_message_notifications?: number; - system_channel_flags?: number; - explicit_content_filter?: number; - public_updates_channel_id?: string; - afk_timeout?: number; - afk_channel_id?: string; - preferred_locale?: string; - premium_progress_bar_enabled?: boolean; -} - router.get("/", route({}), async (req: Request, res: Response) => { const { guild_id } = req.params; diff --git a/src/api/routes/users/@me/settings.ts b/src/api/routes/users/@me/settings.ts index 30e5969c..4493fcc7 100644 --- a/src/api/routes/users/@me/settings.ts +++ b/src/api/routes/users/@me/settings.ts @@ -4,8 +4,6 @@ import { route } from "@fosscord/api"; const router = Router(); -export interface UserSettingsSchema extends Partial<UserSettings> {} - router.get("/", route({}), async (req: Request, res: Response) => { const user = await User.findOneOrFail({ where: { id: req.user_id }, |