🐛 fix body parse treating null not as undefined (except for icons/avatars)

This commit is contained in:
Flam3rboy
2021-09-17 23:42:40 +02:00
parent 4003fef534
commit 859fdd679b
10 changed files with 88 additions and 76 deletions
+3 -3
View File
@@ -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;
}
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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) => {