diff --git a/app/routers/home.py b/app/routers/home.py index f891b1a..d245734 100644 --- a/app/routers/home.py +++ b/app/routers/home.py @@ -94,6 +94,7 @@ async def clear_user_data(request: Request): from ..dependencies import get_redis_client, get_cache_manager actor_id = user.actor_id + username = user.username deleted = { "runs": 0, "recipes": 0, @@ -108,7 +109,7 @@ async def clear_user_data(request: Request): runs = await run_service.list_runs(actor_id, offset=0, limit=10000) for run in runs: try: - await run_service.discard_run(run["run_id"], actor_id) + await run_service.discard_run(run["run_id"], actor_id, username) deleted["runs"] += 1 except Exception as e: errors.append(f"Run {run['run_id']}: {e}")