Skip to content

Commit

Permalink
Fix - Removing todos
Browse files Browse the repository at this point in the history
  • Loading branch information
FarukBraimo committed Jun 19, 2024
1 parent 39e095c commit 386e911
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 94 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ public ExchangeRateResponse getExchangeRates(String countryCode) {

ExchangeRateResponse ratesFromMainSource = buildExchangeRates(mainExchangeRateUrl);


// FixME: Enable this
// if (ratesFromMainSource != null) {
// return ratesFromMainSource;
// }
if (ratesFromMainSource != null) {
return ratesFromMainSource;
}
return buildExchangeRates(optionalExchangeRateUrl);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ public class WeatherForecastService {
@Value("${open-weather-map.apiKeyV3}")
private String openWeatherApiKeyV3;

private final String OPEN_WEATHER_API_VERSION = "2.5"; // TODO: Add feature flag Or row controller, to determine the version to use. (2.5 0r 3.0)
private final String OPEN_WEATHER_API_VERSION = "3.0";

// TODO: CACHE THE RESPONSE
public WeatherForecastResponse getWeatherForecast(String city) {
return WeatherForecastResponse
.builder()
Expand All @@ -43,7 +42,7 @@ private OpenWeatherForecastResponse buildWeatherForecast(String city) {
return null;
}

String url = String.format("%s/data/%s/onecall?units=metric&cnt=4&exclude=hourly,minutely,alerts&lat=%s&lon=%s&appid=%s", FalconDefaults.OPEN_WEATHER_API_BASE_URL, OPEN_WEATHER_API_VERSION, location.getLat(), location.getLon(), openWeatherApiKeyV2);
String url = String.format("%s/data/%s/onecall?units=metric&cnt=4&exclude=hourly,minutely,alerts&lat=%s&lon=%s&appid=%s", FalconDefaults.OPEN_WEATHER_API_BASE_URL, OPEN_WEATHER_API_VERSION, location.getLat(), location.getLon(), openWeatherApiKeyV3);
HttpResponse<String> response = APICaller.getData(url);
if (response != null) {
OpenWeatherForecastResponse openWeatherForecast = deserialize(response.body(), OpenWeatherForecastResponse.class);
Expand Down

0 comments on commit 386e911

Please sign in to comment.