From 6dd8bd4290072369ad83f13fc9ff7894604eb150 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Sat, 20 Jun 2026 02:39:01 +0530 Subject: [PATCH] refactor(routes): replace user variable with auth context in thread snapshot functions --- surfsense_backend/app/routes/new_chat_routes.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/surfsense_backend/app/routes/new_chat_routes.py b/surfsense_backend/app/routes/new_chat_routes.py index 87ed68b2f..4c8f0043c 100644 --- a/surfsense_backend/app/routes/new_chat_routes.py +++ b/surfsense_backend/app/routes/new_chat_routes.py @@ -1251,7 +1251,6 @@ async def list_thread_snapshots( session: AsyncSession = Depends(get_async_session), auth: AuthContext = Depends(get_auth_context), ): - user = auth.user """ List all public snapshots for this thread. @@ -1263,7 +1262,7 @@ async def list_thread_snapshots( snapshots=await list_snapshots_for_thread( session=session, thread_id=thread_id, - user=user, + auth=auth, ) ) @@ -1275,7 +1274,6 @@ async def delete_thread_snapshot( session: AsyncSession = Depends(get_async_session), auth: AuthContext = Depends(get_auth_context), ): - user = auth.user """ Delete a specific snapshot. @@ -1287,7 +1285,7 @@ async def delete_thread_snapshot( session=session, thread_id=thread_id, snapshot_id=snapshot_id, - user=user, + auth=auth, ) return {"message": "Snapshot deleted successfully"}