Implemented Groups delete buttons

This commit is contained in:
2025-10-11 13:48:23 +02:00
parent 0ab76d895e
commit dfe1a2b2b1
3 changed files with 31 additions and 25 deletions

View File

@@ -44,19 +44,19 @@ public class GroupsController : Controller
return groups;
}
[HttpGet("Delete")]
public async Task<bool> Delete(string uid)
[HttpDelete("Delete")]
public async Task<GroupsDeleteResponseModel> Delete(string uid)
{
return await Task.Run(async () =>
{
try
{
await _ldap.DeleteGroupAsync(uid);
return true;
return new GroupsDeleteResponseModel(true);
}
catch (Exception)
{
return false;
return new GroupsDeleteResponseModel(false);
}
});
}