Merge pull request #69 from LD-Reborn/feature/issue_65

Feature: Add return model to AssetsController
This commit is contained in:
LD50
2025-10-05 15:03:48 +02:00
committed by GitHub
6 changed files with 45 additions and 23 deletions

View File

@@ -28,11 +28,11 @@ public class LocationsController : Controller
public async Task<bool> Delete(string cn)
{
if (cn is null) { return false; }
return await Task.Run(() =>
return await Task.Run(async () =>
{
try
{
_ldap.DeleteLocation(cn);
await _ldap.DeleteLocationAsync(cn);
return true;
}
catch (Exception)