Exemplo n.º 1
0
        public async Task <IActionResult> GetPublishedProviderResultsForFundingStream([FromQuery] string fundingPeriodId, [FromQuery] string specificationId, [FromQuery] string fundingStreamId)
        {
            Guard.ArgumentNotNull(fundingPeriodId, nameof(fundingPeriodId));
            Guard.ArgumentNotNull(specificationId, nameof(specificationId));
            Guard.ArgumentNotNull(fundingStreamId, nameof(fundingStreamId));

            ApiResponse <IEnumerable <PublishedProviderResult> > publishedProviderResponse = await _resultsClient.GetPublishedProviderResults(fundingPeriodId, specificationId, fundingStreamId);

            IActionResult errorResult = publishedProviderResponse.IsSuccessOrReturnFailureResult("Getting published provider results for funding stream");

            if (errorResult != null)
            {
                return(errorResult);
            }

            return(Ok(publishedProviderResponse.Content));
        }