feat(chat): add random public_id and fix users blocked route
Some checks failed
CI / test (push) Failing after 20s
Some checks failed
CI / test (push) Failing after 20s
- add chats.public_id random identifier with migration 0011
- expose public_id in chat API payloads
- use chat public_id in message search UI label
- fix users router order so /users/blocked no longer conflicts with /users/{user_id}
This commit is contained in:
@@ -66,6 +66,7 @@ async def serialize_chat_for_user(db: AsyncSession, *, user_id: int, chat: Chat)
|
||||
return ChatRead.model_validate(
|
||||
{
|
||||
"id": chat.id,
|
||||
"public_id": chat.public_id,
|
||||
"type": chat.type,
|
||||
"title": chat.title,
|
||||
"display_title": display_title,
|
||||
@@ -375,6 +376,7 @@ async def discover_public_chats_for_user(db: AsyncSession, *, user_id: int, quer
|
||||
ChatDiscoverRead.model_validate(
|
||||
{
|
||||
"id": chat.id,
|
||||
"public_id": chat.public_id,
|
||||
"type": chat.type,
|
||||
"title": chat.title,
|
||||
"handle": chat.handle,
|
||||
|
||||
Reference in New Issue
Block a user