From 6536f63658644c2d5ae65e97590d37a746465933 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 10 Jul 2022 14:18:49 +1000 Subject: [PATCH] Try to allow role icons to be removed --- api/src/routes/guilds/#guild_id/roles/#role_id/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/src/routes/guilds/#guild_id/roles/#role_id/index.ts b/api/src/routes/guilds/#guild_id/roles/#role_id/index.ts index 2ad01682..f3d707e0 100644 --- a/api/src/routes/guilds/#guild_id/roles/#role_id/index.ts +++ b/api/src/routes/guilds/#guild_id/roles/#role_id/index.ts @@ -42,6 +42,7 @@ router.patch("/", route({ body: "RoleModifySchema", permission: "MANAGE_ROLES" } const body = req.body as RoleModifySchema; if (body.icon) body.icon = await handleFile(`/role-icons/${role_id}`, body.icon as string); + else body.icon = undefined; const role = new Role({ ...body,