diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-07-04 19:45:28 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-07-04 19:45:28 +1000 |
commit | d237be1aacbd4294b65542844ffeaf7d61f9d458 (patch) | |
tree | 06af696d1e7eec6f656c3ff822f02da79bb7f60c /api | |
parent | Placeholder member verification endpoint (diff) | |
download | server-d237be1aacbd4294b65542844ffeaf7d61f9d458.tar.xz |
Welcome screen
Diffstat (limited to 'api')
-rw-r--r-- | api/assets/schemas.json | 3 | ||||
-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); }); |