Spaces:
Runtime error
Runtime error
Download TaskTrackingSystem.WebApi/Features/Dashboard/DashboardController.cs from Yuruyuruu/task-tracking-system: direct link, hf CLI and curl.
- Browser
- Download file 1.61 kB
-
https://huggingface.co/spaces/Yuruyuruu/task-tracking-system/resolve/main/TaskTrackingSystem.WebApi/Features/Dashboard/DashboardController.cs
- Command line
-
hf download hf://spaces/Yuruyuruu/task-tracking-system/TaskTrackingSystem.WebApi/Features/Dashboard/DashboardController.cs
-
curl -L -o DashboardController.cs https://huggingface.co/spaces/Yuruyuruu/task-tracking-system/resolve/main/TaskTrackingSystem.WebApi/Features/Dashboard/DashboardController.cs
1.61 kB
| using Microsoft.AspNetCore.Authorization; | |
| using Microsoft.AspNetCore.Mvc; | |
| using System.Collections.Generic; | |
| using System.Threading.Tasks; | |
| using TaskTrackingSystem.Shared; | |
| using TaskTrackingSystem.Shared.Models.Dashboard; | |
| using TaskTrackingSystem.WebApi.Infrastructure; | |
| namespace TaskTrackingSystem.WebApi.Features.Dashboard | |
| { | |
| [] | |
| [] | |
| [] | |
| public class DashboardController : ControllerBase | |
| { | |
| private readonly DashboardService _dashboardService; | |
| public DashboardController(DashboardService dashboardService) | |
| { | |
| _dashboardService = dashboardService; | |
| } | |
| [] | |
| public async Task<ActionResult<Result<DashboardSummaryDto>>> GetSummary() | |
| { | |
| var result = await _dashboardService.GetSummaryAsync(User.GetRoleId(), User.GetUserId()); | |
| return StatusCode(result.StatusCode, result); | |
| } | |
| [] | |
| public async Task<ActionResult<Result<IEnumerable<TaskStatusOverviewDto>>>> GetTasksOverview() | |
| { | |
| var result = await _dashboardService.GetTasksOverviewAsync(User.GetRoleId(), User.GetUserId()); | |
| return StatusCode(result.StatusCode, result); | |
| } | |
| [] | |
| public async Task<ActionResult<Result<IEnumerable<ProjectProgressDto>>>> GetProjectProgress() | |
| { | |
| var result = await _dashboardService.GetProjectProgressAsync(User.GetRoleId(), User.GetUserId()); | |
| return StatusCode(result.StatusCode, result); | |
| } | |
| } | |
| } | |