예제 #1
0
        public async Task <dynamic> GetCategories(string userId)
        {
            if (string.IsNullOrEmpty(userId))
            {
                return(BadRequest("Provide a user id"));
            }

            try
            {
                return(await _crudService.GetCategoriesAsync(userId));
            }
            catch (Exception e)
            {
                _logger.LogError("List Categories Failed " + e);
                return(BadRequest(e.Message));
            }
        }