diff --git a/app/routes.py b/app/routes.py index 0bf1d8d..6416cab 100644 --- a/app/routes.py +++ b/app/routes.py @@ -49,7 +49,7 @@ def dashboard(): profile = current_user.profile # Get all readings for the user - readings = Reading.query.filter_by(user_id=current_user.id).order_by(Reading.timestamp.desc()).all() + readings = Reading.query.filter_by(user_id=current_user.id).order_by(Reading.timestamp.asc()).all() # Weekly summary (last 7 days) one_week_ago = datetime.now() - timedelta(days=7) @@ -86,7 +86,7 @@ def filter_dashboard(): Reading.user_id == current_user.id, Reading.timestamp >= datetime.strptime(start_date, '%Y-%m-%d'), Reading.timestamp <= datetime.strptime(end_date, '%Y-%m-%d') - ).order_by(Reading.timestamp.desc()).all() + ).order_by(Reading.timestamp.asc()).all() # Pass the delete form to the template delete_form = DeleteForm()