mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added Users table
This commit is contained in:
@@ -45,20 +45,17 @@ public class UsersController : Controller
|
||||
}
|
||||
|
||||
[HttpGet("Delete")]
|
||||
public async Task<bool> Delete(string uid)
|
||||
public async Task<UsersDeleteRequestModel> Delete(string uid)
|
||||
{
|
||||
return await Task.Run(async () =>
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
await _ldap.DeleteUserAsync(uid);
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
});
|
||||
await _ldap.DeleteUserAsync(uid);
|
||||
return new UsersDeleteRequestModel(true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new UsersDeleteRequestModel(false, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("Create")]
|
||||
|
||||
Reference in New Issue
Block a user