From 1621141e769742c9767cbd8ba7261294fdc07fb3 Mon Sep 17 00:00:00 2001 From: Chelsea Lee Date: Mon, 16 Feb 2026 06:16:02 -0600 Subject: [PATCH] fix(bot): use duration_minutes instead of duration_seconds when creating steps - API expects duration_minutes field, not duration_seconds - Fixed in both create_with_steps and add_steps actions --- bot/commands/routines.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bot/commands/routines.py b/bot/commands/routines.py index 161c113..d6a956a 100644 --- a/bot/commands/routines.py +++ b/bot/commands/routines.py @@ -115,8 +115,7 @@ async def handle_routine(message, session, parsed): for i, step_name in enumerate(steps): step_data = { "name": step_name, - "description": "", - "duration_seconds": None + "duration_minutes": None # API expects minutes, not seconds } resp, status = api_request("post", f"/api/routines/{routine_id}/steps", token, step_data) if status == 201: @@ -530,8 +529,7 @@ async def _create_routine_with_steps(message, token, name, description, steps): for i, step_name in enumerate(steps): step_data = { "name": step_name, - "description": "", - "duration_seconds": None + "duration_minutes": None # API expects minutes, not seconds } step_resp, step_status = api_request("post", f"/api/routines/{routine_id}/steps", token, step_data) if step_status == 201: