diff --git a/app.py b/app.py index cb36a58..77f2c2e 100644 --- a/app.py +++ b/app.py @@ -104,14 +104,13 @@ def set_timezone(): @app.route('/') def dashboard_current(username): - """Dashboard for current NFL week - shows loading state first""" + """Dashboard for current NFL week""" print(f"DEBUG: Dashboard current route - username: '{username}'", flush=True) try: nfl_state = sleeper_api.get_nfl_state() current_week = nfl_state.get('display_week', 1) print(f"DEBUG: Current week: {current_week}", flush=True) - # Show loading state first for better UX - return render_template('loading.html', username=username, week=current_week) + return dashboard(username, current_week) except Exception as e: print(f"ERROR: dashboard_current exception - {str(e)}", flush=True) print(f"ERROR: Full traceback: {traceback.format_exc()}", flush=True) @@ -120,22 +119,15 @@ def dashboard_current(username): @app.route('//') def dashboard_week(username, week): - """Dashboard for specific week - shows loading state first""" + """Dashboard for specific week""" print(f"DEBUG: Dashboard week - username: '{username}', week: {week}", flush=True) - # Show loading state first for better UX - return render_template('loading.html', username=username, week=week) - -@app.route('///data') -def dashboard_data(username, week): - """Dashboard data route - actual API calls and data loading""" - print(f"DEBUG: Dashboard data route - username: '{username}', week: {week}", flush=True) return dashboard(username, week) @app.route('///refresh', methods=['POST']) def refresh_scores(username, week): - """Server-side refresh scores - redirect back to dashboard data""" + """Server-side refresh scores - redirect back to dashboard""" print(f"DEBUG: Refresh scores POST - username: '{username}', week: {week}", flush=True) - return redirect(url_for('dashboard_data', username=username, week=week)) + return redirect(url_for('dashboard_week', username=username, week=week)) def dashboard(username, week): """Main dashboard logic - fetch and display user's fantasy data"""