diff --git a/src/app/endpoints/conversations.py b/src/app/endpoints/conversations.py index 776a19f7..d13f1640 100644 --- a/src/app/endpoints/conversations.py +++ b/src/app/endpoints/conversations.py @@ -160,7 +160,7 @@ async def get_conversations_list_endpoint_handler( """Handle request to retrieve all conversations for the authenticated user.""" check_configuration_loaded(configuration) - user_id, _, _ = auth + user_id = auth[0] logger.info("Retrieving conversations for user %s", user_id) @@ -249,7 +249,7 @@ async def get_conversation_endpoint_handler( }, ) - user_id, _, _ = auth + user_id = auth[0] user_conversation = validate_conversation_ownership( user_id=user_id, @@ -371,7 +371,7 @@ async def delete_conversation_endpoint_handler( }, ) - user_id, _, _ = auth + user_id = auth[0] user_conversation = validate_conversation_ownership( user_id=user_id, diff --git a/tests/unit/app/endpoints/test_conversations.py b/tests/unit/app/endpoints/test_conversations.py index cde19bf9..7c372da1 100644 --- a/tests/unit/app/endpoints/test_conversations.py +++ b/tests/unit/app/endpoints/test_conversations.py @@ -21,7 +21,7 @@ from configuration import AppConfig from tests.unit.utils.auth_helpers import mock_authorization_resolvers -MOCK_AUTH = ("mock_user_id", "mock_username", "mock_token") +MOCK_AUTH = ("mock_user_id", "mock_username", False, "mock_token") VALID_CONVERSATION_ID = "123e4567-e89b-12d3-a456-426614174000" INVALID_CONVERSATION_ID = "invalid-id"