26 lines
675 B
C#
26 lines
675 B
C#
using line_gestao_api.Dtos;
|
|
using line_gestao_api.Services;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace line_gestao_api.Controllers
|
|
{
|
|
[ApiController]
|
|
[Route("api/dashboard/geral")]
|
|
public class DashboardGeralController : ControllerBase
|
|
{
|
|
private readonly GeralDashboardInsightsService _service;
|
|
|
|
public DashboardGeralController(GeralDashboardInsightsService service)
|
|
{
|
|
_service = service;
|
|
}
|
|
|
|
[HttpGet("insights")]
|
|
public async Task<ActionResult<GeralDashboardInsightsDto>> GetInsights()
|
|
{
|
|
var dto = await _service.GetInsightsAsync();
|
|
return Ok(dto);
|
|
}
|
|
}
|
|
}
|