Add return model to AssetsController

This commit is contained in:
anomny
2025-10-05 14:50:59 +02:00
parent 35d95b7783
commit d12ac659f5
6 changed files with 45 additions and 23 deletions

View File

@@ -26,11 +26,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)