35 lines
739 B
C#
35 lines
739 B
C#
namespace MyOffice.Web.Controllers;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using MyOffice.Services.Account;
|
|
using MyOffice.Services.Item;
|
|
using Services.Dashboard;
|
|
|
|
[Authorize]
|
|
[ApiController]
|
|
[Route("api/[controller]")]
|
|
public class DashboardController : BaseApiController
|
|
{
|
|
private readonly ILogger<DashboardController> _logger;
|
|
private readonly DashboardService _dashboardService;
|
|
|
|
public DashboardController(
|
|
ILogger<DashboardController> logger,
|
|
DashboardService dashboardService
|
|
)
|
|
{
|
|
_logger = logger;
|
|
_dashboardService = dashboardService;
|
|
}
|
|
|
|
|
|
[HttpGet("~/api/dashboard")]
|
|
public object Index()
|
|
{
|
|
var data = _dashboardService.GetDashboardRestData(UserId);
|
|
|
|
return data;
|
|
}
|
|
}
|