mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
25 lines
608 B
C#
25 lines
608 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
using Berufsschule_HAM.Models;
|
|
using Novell.Directory.Ldap;
|
|
using Berufsschule_HAM.Services;
|
|
|
|
[Route("[controller]")]
|
|
public class AssetsController : Controller
|
|
{
|
|
private readonly LdapService _ldap;
|
|
|
|
public AssetsController(LdapService ldap)
|
|
{
|
|
_ldap = ldap ?? throw new ArgumentNullException(nameof(ldap));
|
|
}
|
|
|
|
// GET: /Assets
|
|
[HttpGet("Index")]
|
|
public async Task<IEnumerable<Dictionary<string, string>>> Index()
|
|
{
|
|
var list = await _ldap.ListDeviceAsync();
|
|
return list;
|
|
}
|
|
} |