mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-01 20:03:30 +02:00
add public_share_enabled to thread response schemas
This commit is contained in:
parent
90cf6d4b1b
commit
37526b74a9
2 changed files with 5 additions and 1 deletions
|
|
@ -218,6 +218,7 @@ async def list_threads(
|
||||||
visibility=thread.visibility,
|
visibility=thread.visibility,
|
||||||
created_by_id=thread.created_by_id,
|
created_by_id=thread.created_by_id,
|
||||||
is_own_thread=is_own_thread,
|
is_own_thread=is_own_thread,
|
||||||
|
public_share_enabled=thread.public_share_enabled,
|
||||||
created_at=thread.created_at,
|
created_at=thread.created_at,
|
||||||
updated_at=thread.updated_at,
|
updated_at=thread.updated_at,
|
||||||
)
|
)
|
||||||
|
|
@ -319,6 +320,7 @@ async def search_threads(
|
||||||
thread.created_by_id == user.id
|
thread.created_by_id == user.id
|
||||||
or (thread.created_by_id is None and is_search_space_owner)
|
or (thread.created_by_id is None and is_search_space_owner)
|
||||||
),
|
),
|
||||||
|
public_share_enabled=thread.public_share_enabled,
|
||||||
created_at=thread.created_at,
|
created_at=thread.created_at,
|
||||||
updated_at=thread.updated_at,
|
updated_at=thread.updated_at,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,7 @@ class NewChatThreadRead(NewChatThreadBase, IDModel):
|
||||||
search_space_id: int
|
search_space_id: int
|
||||||
visibility: ChatVisibility
|
visibility: ChatVisibility
|
||||||
created_by_id: UUID | None = None
|
created_by_id: UUID | None = None
|
||||||
|
public_share_enabled: bool = False
|
||||||
created_at: datetime
|
created_at: datetime
|
||||||
updated_at: datetime
|
updated_at: datetime
|
||||||
|
|
||||||
|
|
@ -133,7 +134,8 @@ class ThreadListItem(BaseModel):
|
||||||
archived: bool
|
archived: bool
|
||||||
visibility: ChatVisibility
|
visibility: ChatVisibility
|
||||||
created_by_id: UUID | None = None
|
created_by_id: UUID | None = None
|
||||||
is_own_thread: bool = False # True if the current user created this thread
|
is_own_thread: bool = False
|
||||||
|
public_share_enabled: bool = False
|
||||||
created_at: datetime = Field(alias="createdAt")
|
created_at: datetime = Field(alias="createdAt")
|
||||||
updated_at: datetime = Field(alias="updatedAt")
|
updated_at: datetime = Field(alias="updatedAt")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue