summary refs log tree commit diff
path: root/api/src/routes/guilds
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-17 23:42:40 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-17 23:42:40 +0200
commitc20f4b4ef539a44c8e091815c5603acbf0fa8d04 (patch)
tree49e32c077cec3734d939ec4d4bb26980239f593a /api/src/routes/guilds
parent:bug: fix vanity url (diff)
downloadserver-c20f4b4ef539a44c8e091815c5603acbf0fa8d04.tar.xz
:bug: fix body parse treating null not as undefined (except for icons/avatars)
Diffstat (limited to 'api/src/routes/guilds')
-rw-r--r--api/src/routes/guilds/#guild_id/index.ts6
-rw-r--r--api/src/routes/guilds/index.ts4
-rw-r--r--api/src/routes/guilds/templates/index.ts2
3 files changed, 6 insertions, 6 deletions
diff --git a/api/src/routes/guilds/#guild_id/index.ts b/api/src/routes/guilds/#guild_id/index.ts
index 7e4bf28a..63000b84 100644
--- a/api/src/routes/guilds/#guild_id/index.ts
+++ b/api/src/routes/guilds/#guild_id/index.ts
@@ -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;
 }
 
diff --git a/api/src/routes/guilds/index.ts b/api/src/routes/guilds/index.ts
index 2334bb9c..2e68d953 100644
--- a/api/src/routes/guilds/index.ts
+++ b/api/src/routes/guilds/index.ts
@@ -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;
 }
 
diff --git a/api/src/routes/guilds/templates/index.ts b/api/src/routes/guilds/templates/index.ts
index eb3867c8..b5e243e9 100644
--- a/api/src/routes/guilds/templates/index.ts
+++ b/api/src/routes/guilds/templates/index.ts
@@ -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) => {