Example #1
0
        public IActionResult GetActualWeatherMap(int cityId)
        {
            var city    = _cityService.GetCity(cityId);
            var country = _countryService.GetCountry(); //si hubiera mas paises, deberia pasarsele un id desde el front
            var weather = _weatherService.GetActualWeatherMap(city.Name, country.ApiCode);

            weather.City    = city;
            weather.Country = country;
            _weatherService.AddHistoricalWeather(weather);
            return(Ok(weather));
        }