mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-24 21:38:09 +02:00
refactor(routes): replace user variable with auth context in search space snapshot functions
This commit is contained in:
parent
6dd8bd4290
commit
8e50871d43
2 changed files with 2 additions and 4 deletions
|
|
@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue