Add matched training signals, daily recovery and performance analysis

This commit is contained in:
Peter Stockings
2026-10-03 13:22:32 +10:00
parent e6e2f22479
commit 418e03583a
37 changed files with 1380 additions and 47 deletions
+6 -1
View File
@@ -550,7 +550,7 @@ def garmin_action(action):
from .sync import connect, session_lock
if action not in {"connect", "sync", "schedule", "disconnect"}:
if action not in {"connect", "sync", "schedule", "disconnect", "health"}:
abort(404)
try:
if action == "connect":
@@ -572,6 +572,11 @@ def garmin_action(action):
elif action == "schedule":
connection.scheduled = request.form.get("enabled") == "yes"
connection.next_sync = datetime.now(UTC)
elif action == "health":
connection.health_enabled = request.form.get("enabled") == "yes"
connection.health_message = "Daily recovery sync queued." if connection.health_enabled else "Daily recovery sync is off."
if connection.health_enabled:
connection.pending = True
else:
db.session.delete(connection)
current_user.local_account_key = None