🐛 fix body parse treating null not as undefined (except for icons/avatars)
This commit is contained in:
@@ -11,15 +11,15 @@ const router = Router();
|
||||
export interface GuildUpdateSchema extends Omit<GuildCreateSchema, "channels"> {
|
||||
banner?: string | null;
|
||||
splash?: string | null;
|
||||
description?: 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 | null;
|
||||
public_updates_channel_id?: string;
|
||||
afk_timeout?: number;
|
||||
afk_channel_id?: string | null;
|
||||
afk_channel_id?: string;
|
||||
preferred_locale?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ export interface GuildCreateSchema {
|
||||
*/
|
||||
name: string;
|
||||
region?: string;
|
||||
icon?: string;
|
||||
icon?: string | null;
|
||||
channels?: ChannelModifySchema[];
|
||||
guild_template_code?: string;
|
||||
system_channel_id?: string | null;
|
||||
system_channel_id?: string;
|
||||
rules_channel_id?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { DiscordApiErrors } from "@fosscord/util";
|
||||
|
||||
export interface GuildTemplateCreateSchema {
|
||||
name: string;
|
||||
avatar?: string;
|
||||
avatar?: string | null;
|
||||
}
|
||||
|
||||
router.get("/:code", route({}), async (req: Request, res: Response) => {
|
||||
|
||||
Reference in New Issue
Block a user