Class DashboardController
java.lang.Object
com.nicholasalfonso.lato.controller.DashboardController
REST controller for dashboard data aggregation.
Provides endpoints for retrieving dashboard summaries and statistics for the user.
-
Constructor Summary
ConstructorsConstructorDescriptionDashboardController(DashboardService dashboardService, CurrentUserService currentUserService, AssignmentMapper assignmentMapper) Creates the dashboard controller with required services and mappers. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves aggregated dashboard data for the authenticated user.Retrieves overall statistics for the authenticated user.Retrieves upcoming incomplete assignments for the authenticated user.
-
Constructor Details
-
DashboardController
public DashboardController(DashboardService dashboardService, CurrentUserService currentUserService, AssignmentMapper assignmentMapper) Creates the dashboard controller with required services and mappers.- Parameters:
dashboardService- service for dashboard data aggregationcurrentUserService- service to resolve the current authenticated userassignmentMapper- mapper for assignment response DTOs
-
-
Method Details
-
handleGetDashboardDataRequest
Retrieves aggregated dashboard data for the authenticated user.- Returns:
- dashboard data including upcoming assignments and course progress
-
handleGetUpcomingAssignmentsRequest
@GetMapping("/upcoming-assignments") public List<AssignmentResponse> handleGetUpcomingAssignmentsRequest()Retrieves upcoming incomplete assignments for the authenticated user.- Returns:
- list of upcoming assignment responses
-
handleGetStatisticsRequest
Retrieves overall statistics for the authenticated user.- Returns:
- dashboard statistics including course and assignment counts
-