From 1e05bde90db481662a7c35be14adfd01eef427e8 Mon Sep 17 00:00:00 2001 From: ChromaticPanic <78883122+ChromaticPanic@users.noreply.github.com> Date: Fri, 21 Jun 2024 06:29:58 -0500 Subject: [PATCH 1/2] fix uuid endpoint --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 app.py diff --git a/app.py b/app.py old mode 100644 new mode 100755 index 7978c12..5cfec1f --- a/app.py +++ b/app.py @@ -192,7 +192,7 @@ async def get_user_id() : user_id = datastore.get_user_id(email) - return jsonify(user_id), 200 + return jsonify({"user_id": user_id}), 200 except (KeyError, TypeError, ValueError, datastore.DatastoreError) as error: print(error) return jsonify([f"GetUserIdError: {str(error)}"]), 400 From 3718b46e92fca204bb0ec7222b72f559f7529100 Mon Sep 17 00:00:00 2001 From: ChromaticPanic <78883122+ChromaticPanic@users.noreply.github.com> Date: Fri, 21 Jun 2024 07:33:59 -0500 Subject: [PATCH 2/2] Fix annotated feedback call --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 5cfec1f..6f1a9df 100755 --- a/app.py +++ b/app.py @@ -536,7 +536,7 @@ async def feedback_negative(): if inference_id and user_id and boxes : connection = datastore.get_connection() cursor = datastore.get_cursor(connection) - await datastore.save_annoted_feedback(inference_id, user_id, boxes) + await datastore.save_annoted_feedback(cursor, inference_id, user_id, boxes) datastore.end_query(connection, cursor) return jsonify([True]), 200 else: