diff --git a/internal/buggy-branch-diff.diff b/internal/buggy-branch-diff.diff index 0aa5139..2ceef3a 100644 --- a/internal/buggy-branch-diff.diff +++ b/internal/buggy-branch-diff.diff @@ -20,4 +20,4 @@ diff --git a/server.py b/server.py + # Business logic: Recommend activity based on weather recommended_activity = 'Play a board game' - if weather['temperature'] > 40: \ No newline at end of file + if weather['temperature'] > 40: diff --git a/internal/create-buggy-pr.sh b/internal/create-buggy-pr.sh old mode 100644 new mode 100755 diff --git a/server.py b/server.py index f6ba079..f57a1e5 100644 --- a/server.py +++ b/server.py @@ -6,6 +6,10 @@ PORT = 3000 +def convert_celsius_to_fahrenheit(celsius): + return (celsius * 9/5) + 32 + + @app.route('/api/weather-activity', methods=['GET']) def weather_activity(): """Get location from IP, weather, and activity recommendations""" @@ -29,6 +33,8 @@ def weather_activity(): weather_response.raise_for_status() weather = weather_response.json()['current_weather'] + weather['temperature'] = convert_celsius_to_fahrenheit(weather['temperature']) + # Business logic: Recommend activity based on weather recommended_activity = 'Play a board game' if weather['temperature'] > 40: