public async Task <IActionResult> GetEatHealthParameters([FromQuery] DateTime dateInUtc) { var loggedUser = User.GetUserIdFromToken(); var user = await _userService.GetUserDevicesAsync(loggedUser); var userImcKcal = await _eatService.GetKCalImcAsync(loggedUser, dateInUtc); IHealthyHelper healthyHelper = new HealthyHelper(userImcKcal.imc, userImcKcal.kcal, _accountService, _dishService); var result = healthyHelper.GetUserEatHealtParameters(user); return(Ok(new ApiOkResponse(result))); }
public async Task <IActionResult> IsValancedPlan([FromQuery] DateTime dateInUtc) { var loggedUser = User.GetUserIdFromToken(); var user = await _userService.GetUserDevicesAsync(loggedUser); var plan = await _eatService.GetUserPlanPerDateAsync(loggedUser, dateInUtc); var userImcKcal = await _eatService.GetKCalImcAsync(loggedUser, dateInUtc); IHealthyHelper healthyHelper = new HealthyHelper(userImcKcal.imc, userImcKcal.kcal, _accountService, _dishService); var result = healthyHelper.IsBalancedPlan(user, plan); return(Ok(new ApiOkResponse(result))); }