Files
Berufsschule_HAM/Controllers/LocationsController.cs
2025-09-26 11:40:52 +02:00

20 lines
532 B
C#

// Controllers/LocationsController.cs
using Berufsschule_HAM.Services;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
[Route("[controller]")]
public class LocationsController : Controller
{
private readonly LdapService _ldap;
public LocationsController(LdapService ldap) => _ldap = ldap;
[HttpGet("Index")]
public async Task<IEnumerable<Dictionary<string, string>>> Index()
{
IEnumerable<Dictionary<string, string>> list = await _ldap.ListLocationsAsync();
return list;
}
}