mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Initial commit
This commit is contained in:
19
Controllers/LocationsController.cs
Normal file
19
Controllers/LocationsController.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
// 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user