예제 #1
0
        public async Task <CurrencyQueryResponse> GetFromTo([FromQuery] string symbol, [FromQuery] DateTime from, [FromQuery] DateTime?to)
        {
            var currency = await _currencyManager.GetCurrenciesByDate(symbol, from, to);

            return(currency != null?_mapper.Map <CurrencyQueryResponse>(currency)
                       : throw new ApiProblemDetailsException($"No data found.", Status404NotFound));
        }