Added Locations Delete CRUD element

This commit is contained in:
2025-10-03 21:27:00 +02:00
parent 308c5f808c
commit bd298874c4
2 changed files with 24 additions and 0 deletions

View File

@@ -16,4 +16,22 @@ public class LocationsController : Controller
return list;
}
[HttpGet("Delete")]
public async Task<bool> Delete(string cn)
{
if (cn is null) { return false; }
return await Task.Run(() =>
{
try
{
_ldap.DeleteLocation(cn);
return true;
}
catch (Exception)
{
return false;
}
});
}
}