feat: initial bulk role reorder route

This commit is contained in:
Zomatree
2025-06-05 18:59:10 +01:00
committed by izzy
parent 8cc4bbea4d
commit c526095d4f
5 changed files with 94 additions and 10 deletions

View File

@@ -45,22 +45,15 @@ pub async fn edit(
name,
colour,
hoist,
rank,
remove,
// rank is deprecated
..
} = data;
// Prevent us from moving a role above other roles
if let Some(rank) = &rank {
if rank <= &member_rank {
return Err(create_error!(NotElevated));
}
}
let partial = PartialRole {
name,
colour,
hoist,
rank,
..Default::default()
};