Ejemplo n.º 1
0
        public IActionResult GetDashboard([FromBody] DashboardModel model)
        {
            model.DailyXp        = _workoutService.GetTotalUserXPInOneDay(DateTime.Today, model.userId);
            model.WeeklyXp       = _workoutService.GetTotalUserXPInLast7Days(DateTime.Today, model.userId);
            model.MonthlyXp      = _workoutService.GetTotalUserXpInLastMounth(DateTime.Today, model.userId);
            model.YearlyXp       = _workoutService.GetTotalUserXPInOneDay(DateTime.Today, model.userId);
            model.SevenDaysXp    = _workoutService.GetUserXpInEachLast7Days(DateTime.Today, model.userId);
            model.TwelveMonthsXp = _workoutService.GetUserXpInEachLast12Months(DateTime.Today, model.userId);

            // var workout = _mapper.Map<Workout>(model);

            return(Ok(model));
        }