Try to allow role icons to be removed
This commit is contained in:
parent
9a685108c7
commit
5612a47b49
@ -42,6 +42,7 @@ router.patch("/", route({ body: "RoleModifySchema", permission: "MANAGE_ROLES" }
|
|||||||
const body = req.body as RoleModifySchema;
|
const body = req.body as RoleModifySchema;
|
||||||
|
|
||||||
if (body.icon) body.icon = await handleFile(`/role-icons/${role_id}`, body.icon as string);
|
if (body.icon) body.icon = await handleFile(`/role-icons/${role_id}`, body.icon as string);
|
||||||
|
else body.icon = undefined;
|
||||||
|
|
||||||
const role = new Role({
|
const role = new Role({
|
||||||
...body,
|
...body,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user