Add matched training signals, daily recovery and performance analysis
This commit is contained in:
+6
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user