public async Task <IActionResult> GetUserMeals() { var userId = userService.GetCurrentUserId(HttpContext); var response = await mealService.GetUserMeals(userId).ConfigureAwait(false); if (!response.IsSuccess) { return(BadRequest(response.Message)); } var mealViewModels = mapper.Map <IEnumerable <Meal>, IEnumerable <MealViewModel> >(response.MealsFound); return(Ok(mealViewModels)); }