Пример #1
0
        public async Task <IActionResult> GetMeals()
        {
            var products = await _mealService.GetMealsAsync();

            if (products == null)
            {
                return(BadRequest("Error"));
            }
            return(Ok(products));
        }
Пример #2
0
        public async Task <IActionResult> Get()
        {
            var meals = await _mealService.GetMealsAsync(User.Identity.Name);

            return(Ok(meals));
        }