public async Task <IActionResult> GetFilter(string id)
        {
            if (string.IsNullOrWhiteSpace(id))
            {
                return(BuildMissingParameter("id"));
            }

            var filter = await _filterRepository.Get(id);

            if (filter == null)
            {
                return(new StatusCodeResult((int)HttpStatusCode.NotFound));
            }

            return(new OkObjectResult(filter.ToDto()));
        }
Ejemplo n.º 2
0
        public FilterValues GetFilterValues(LibraryType type, string field, string[] libraryIds)
        {
            var values = _filterRepository.Get(field, libraryIds);

            return(values ?? CalculateFilterValues(type, field, libraryIds));
        }