mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Implemented Groups delete buttons
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user