refactor(routes): replace user variable with auth context in search space snapshot functions

This commit is contained in:
Anish Sarkar 2026-06-20 02:48:08 +05:30
parent 6dd8bd4290
commit 8e50871d43
2 changed files with 2 additions and 4 deletions

View file

@ -1228,7 +1228,6 @@ async def create_thread_snapshot(
session: AsyncSession = Depends(get_async_session),
auth: AuthContext = Depends(get_auth_context),
):
user = auth.user
"""
Create a public snapshot of the thread.
@ -1239,7 +1238,7 @@ async def create_thread_snapshot(
return await create_snapshot(
session=session,
thread_id=thread_id,
user=user,
auth=auth,
)

View file

@ -438,7 +438,6 @@ async def list_search_space_snapshots(
session: AsyncSession = Depends(get_async_session),
auth: AuthContext = Depends(get_auth_context),
):
user = auth.user
"""
List all public chat snapshots for a search space.
@ -450,6 +449,6 @@ async def list_search_space_snapshots(
snapshots = await list_snapshots_for_search_space(
session=session,
search_space_id=search_space_id,
user=user,
auth=auth,
)
return PublicChatSnapshotsBySpaceResponse(snapshots=snapshots)