Example #1
0
        public async Task <IActionResult> GetRates()
        {
            try
            {
                IEnumerable <ConversionRate> rates = await _ratesService.GetConversionRates();

                _persistenceService.SaveRates(rates);
                return(Ok(rates));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Peticion erronea");
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }
        }