using ClientApiPoC.Shared; using ClientApiPoC.Shared.Models; using Microsoft.AspNetCore.Mvc; namespace ClientApiPoC.ApiService.Controllers { [ApiController] [Route(Routes.EXAMPLE_REQUEST)] public class ExampleRequestController : ControllerBase { private readonly TunnelServer _tunnel; public ExampleRequestController(TunnelServer tunnel) { if (tunnel == null) throw new ArgumentNullException(nameof(tunnel)); _tunnel = tunnel; } [HttpGet] public async Task Get() { // Daten der Clients abfragen... var clients = await _tunnel.GetDataFromAllClientsAsync(); var result = new ExampleRequestResultModel() { ServerMessage = "Hello, world!", Clients = clients }; return result; } } }