summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorAlTech98 <altech123159@gmail.com>2021-09-13 19:25:44 +0200
committerAlTech98 <altech123159@gmail.com>2021-09-13 19:25:44 +0200
commit5589c26b9442a27ee2d1eb2fa882a529eec8a784 (patch)
tree20cb8691904d47037e4e97ec72a362db82e21577 /api
parentMerge pull request #357 from AlTech98/user-update (diff)
downloadserver-5589c26b9442a27ee2d1eb2fa882a529eec8a784.tar.xz
Fix #356
Diffstat (limited to 'api')
-rw-r--r--api/assets/schemas.json35
-rw-r--r--api/src/routes/guilds/#guild_id/index.ts10
-rw-r--r--api/src/routes/guilds/index.ts2
3 files changed, 34 insertions, 13 deletions
diff --git a/api/assets/schemas.json b/api/assets/schemas.json
index 94aa0660..3f760c35 100644
--- a/api/assets/schemas.json
+++ b/api/assets/schemas.json
@@ -2548,7 +2548,10 @@
                 "type": "string"
             },
             "system_channel_id": {
-                "type": "string"
+                "type": [
+                    "null",
+                    "string"
+                ]
             },
             "rules_channel_id": {
                 "type": "string"
@@ -2802,13 +2805,22 @@
         "type": "object",
         "properties": {
             "banner": {
-                "type": "string"
+                "type": [
+                    "null",
+                    "string"
+                ]
             },
             "splash": {
-                "type": "string"
+                "type": [
+                    "null",
+                    "string"
+                ]
             },
             "description": {
-                "type": "string"
+                "type": [
+                    "null",
+                    "string"
+                ]
             },
             "features": {
                 "type": "array",
@@ -2829,13 +2841,19 @@
                 "type": "integer"
             },
             "public_updates_channel_id": {
-                "type": "string"
+                "type": [
+                    "null",
+                    "string"
+                ]
             },
             "afk_timeout": {
                 "type": "integer"
             },
             "afk_channel_id": {
-                "type": "string"
+                "type": [
+                    "null",
+                    "string"
+                ]
             },
             "preferred_locale": {
                 "type": "string"
@@ -2854,7 +2872,10 @@
                 "type": "string"
             },
             "system_channel_id": {
-                "type": "string"
+                "type": [
+                    "null",
+                    "string"
+                ]
             },
             "rules_channel_id": {
                 "type": "string"
diff --git a/api/src/routes/guilds/#guild_id/index.ts b/api/src/routes/guilds/#guild_id/index.ts
index 690d4103..9c67798d 100644
--- a/api/src/routes/guilds/#guild_id/index.ts
+++ b/api/src/routes/guilds/#guild_id/index.ts
@@ -9,17 +9,17 @@ import { GuildCreateSchema } from "../index";
 const router = Router();
 
 export interface GuildUpdateSchema extends Omit<GuildCreateSchema, "channels"> {
-	banner?: string;
-	splash?: string;
-	description?: string;
+	banner?: string | null;
+	splash?: string | null;
+	description?: string | null;
 	features?: string[];
 	verification_level?: number;
 	default_message_notifications?: number;
 	system_channel_flags?: number;
 	explicit_content_filter?: number;
-	public_updates_channel_id?: string;
+	public_updates_channel_id?: string | null;
 	afk_timeout?: number;
-	afk_channel_id?: string;
+	afk_channel_id?: string | null;
 	preferred_locale?: string;
 }
 
diff --git a/api/src/routes/guilds/index.ts b/api/src/routes/guilds/index.ts
index ba951f96..674dc16b 100644
--- a/api/src/routes/guilds/index.ts
+++ b/api/src/routes/guilds/index.ts
@@ -16,7 +16,7 @@ export interface GuildCreateSchema {
 	icon?: string;
 	channels?: ChannelModifySchema[];
 	guild_template_code?: string;
-	system_channel_id?: string;
+	system_channel_id?: string | null;
 	rules_channel_id?: string;
 }