public IActionResult AllCards(DashboardRequest.AllCards model) { var data = _dashboardService.GetDashboard(User.GetUserId(), model); return(Ok(new General.ResponseResult { Data = data })); }
public DashboardResponse.AllCards GetDashboard(int userId, DashboardRequest.AllCards model) { DashboardResponse.AllCards response = new DashboardResponse.AllCards(); response.ChartData = GetChartCard(userId, model.ChartData); response.LearnedWords = GetLearnedWordsCard(userId, model.LearnedWords); response.ProgressRate = GetProgressRate(userId); response.TotalSentences = GetSentencesCard(userId, model.TotalSentences); response.TotalWords = GetTotalWordsCard(userId, model.TotalWords); return(response); }