package com.tcm.training.admin.statistics.controller; import com.tcm.training.admin.common.ApiResponse; import com.tcm.training.admin.statistics.service.HomeDashboardAppService; import com.tcm.training.admin.statistics.vo.HomeDashboardVO; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @Validated @RestController @RequestMapping({"/api/v1", "/api"}) public class HomeDashboardController { private final HomeDashboardAppService homeDashboardAppService; public HomeDashboardController(HomeDashboardAppService homeDashboardAppService) { this.homeDashboardAppService = homeDashboardAppService; } @GetMapping("/home-dashboard") public ApiResponse dashboard() { return ApiResponse.ok(homeDashboardAppService.dashboard()); } }