summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-04 19:45:28 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-04 19:45:28 +1000
commitd237be1aacbd4294b65542844ffeaf7d61f9d458 (patch)
tree06af696d1e7eec6f656c3ff822f02da79bb7f60c /api
parentPlaceholder member verification endpoint (diff)
downloadserver-d237be1aacbd4294b65542844ffeaf7d61f9d458.tar.xz
Welcome screen
Diffstat (limited to 'api')
-rw-r--r--api/assets/schemas.json3
-rw-r--r--api/src/routes/guilds/#guild_id/welcome-screen.ts (renamed from api/src/routes/guilds/#guild_id/welcome_screen.ts)4
2 files changed, 4 insertions, 3 deletions
diff --git a/api/assets/schemas.json b/api/assets/schemas.json
index 4464304b..f066f71e 100644
--- a/api/assets/schemas.json
+++ b/api/assets/schemas.json
@@ -10506,8 +10506,7 @@
                     "additionalProperties": false,
                     "required": [
                         "channel_id",
-                        "description",
-                        "emoji_name"
+                        "description"
                     ]
                 }
             },
diff --git a/api/src/routes/guilds/#guild_id/welcome_screen.ts b/api/src/routes/guilds/#guild_id/welcome-screen.ts
index 7141f17e..5c7a9daa 100644
--- a/api/src/routes/guilds/#guild_id/welcome_screen.ts
+++ b/api/src/routes/guilds/#guild_id/welcome-screen.ts
@@ -10,7 +10,7 @@ export interface GuildUpdateWelcomeScreenSchema {
 		channel_id: string;
 		description: string;
 		emoji_id?: string;
-		emoji_name: string;
+		emoji_name?: string;
 	}[];
 	enabled?: boolean;
 	description?: string;
@@ -36,6 +36,8 @@ router.patch("/", route({ body: "GuildUpdateWelcomeScreenSchema", permission: "M
 	if (body.description) guild.welcome_screen.description = body.description;
 	if (body.enabled != null) guild.welcome_screen.enabled = body.enabled;
 
+	await guild.save();
+
 	res.sendStatus(204);
 });