From 8a370ba5c7de7ab832f2a91869777ace35fd4ac9 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Tue, 9 Sep 2025 13:24:55 -0400 Subject: [PATCH 1/3] fix conversations endpoint error Signed-off-by: Stephanie --- src/app/endpoints/conversations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/endpoints/conversations.py b/src/app/endpoints/conversations.py index 776a19f7..0e960c6c 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 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 user_conversation = validate_conversation_ownership( user_id=user_id, From a8cd0ae6d21f5df116beb8c0ecc8ca2b51000935 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Tue, 9 Sep 2025 13:44:41 -0400 Subject: [PATCH 2/3] fix tests Signed-off-by: Stephanie --- src/app/endpoints/conversations.py | 2 +- tests/unit/app/endpoints/test_conversations.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/endpoints/conversations.py b/src/app/endpoints/conversations.py index 0e960c6c..8016a795 100644 --- a/src/app/endpoints/conversations.py +++ b/src/app/endpoints/conversations.py @@ -371,7 +371,7 @@ async def delete_conversation_endpoint_handler( }, ) - user_id, _, _ = auth + user_id, _, _, _ = auth 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" From 6f8a959ce447f9208ae7392d34728b7a3c6468b5 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Tue, 9 Sep 2025 13:46:12 -0400 Subject: [PATCH 3/3] suggested changes Signed-off-by: Stephanie --- src/app/endpoints/conversations.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/endpoints/conversations.py b/src/app/endpoints/conversations.py index 8016a795..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,