Skip to content

Commit e4c7aa1

Browse files
authored
fix conversations endpoint error (#522)
* fix conversations endpoint error Signed-off-by: Stephanie <[email protected]> * fix tests Signed-off-by: Stephanie <[email protected]> * suggested changes Signed-off-by: Stephanie <[email protected]> --------- Signed-off-by: Stephanie <[email protected]>
1 parent ef97cd4 commit e4c7aa1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/app/endpoints/conversations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ async def get_conversations_list_endpoint_handler(
160160
"""Handle request to retrieve all conversations for the authenticated user."""
161161
check_configuration_loaded(configuration)
162162

163-
user_id, _, _ = auth
163+
user_id = auth[0]
164164

165165
logger.info("Retrieving conversations for user %s", user_id)
166166

@@ -249,7 +249,7 @@ async def get_conversation_endpoint_handler(
249249
},
250250
)
251251

252-
user_id, _, _ = auth
252+
user_id = auth[0]
253253

254254
user_conversation = validate_conversation_ownership(
255255
user_id=user_id,
@@ -371,7 +371,7 @@ async def delete_conversation_endpoint_handler(
371371
},
372372
)
373373

374-
user_id, _, _ = auth
374+
user_id = auth[0]
375375

376376
user_conversation = validate_conversation_ownership(
377377
user_id=user_id,

tests/unit/app/endpoints/test_conversations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from configuration import AppConfig
2222
from tests.unit.utils.auth_helpers import mock_authorization_resolvers
2323

24-
MOCK_AUTH = ("mock_user_id", "mock_username", "mock_token")
24+
MOCK_AUTH = ("mock_user_id", "mock_username", False, "mock_token")
2525
VALID_CONVERSATION_ID = "123e4567-e89b-12d3-a456-426614174000"
2626
INVALID_CONVERSATION_ID = "invalid-id"
2727

0 commit comments

Comments
 (0)