1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-06 02:42:37 +01:00

Try to allow role icons to be removed

This commit is contained in:
Madeline 2022-07-10 14:18:49 +10:00
parent cdc97ee8c0
commit 6536f63658
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -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,