Files
Complex/Complex.EndPoint/Controllers/DashboardController.cs
alireza f2880a2167 feat(dashboard): add optional CommonRequestDto parameter to GetManagerSummary
Add optional CommonRequestDto parameter to GetManagerSummary method in both service interface and implementation, and update the controller endpoint to accept it as a query parameter. This allows passing common request data (e.g., pagination, filtering) to the dashboard summary retrieval.
2026-06-09 23:35:16 +03:30

32 lines
911 B
C#

using Complex.Application.Common;
using Complex.Application.Services.Dashboard;
using Complex.Common.Dto;
using Complex.EndPoint.Utility;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Complex.EndPoint.Controllers
{
[ApiController]
[ApiVersion("1")]
[Route("api/v{version:apiVersion}/[controller]/[action]")]
[Authorize]
public class DashboardController : Controller
{
private readonly IDashboardService _dashboardService;
public DashboardController(IDashboardService dashboardService)
{
_dashboardService = dashboardService;
}
[HttpGet]
public ResultDto<DashboardSummaryDto> ManagerSummary(
Guid complexId,
[FromQuery] CommonRequestDto? commonRequest)
{
return _dashboardService.GetManagerSummary(complexId, commonRequest);
}
}
}