From f6f2573778c2e9332aac3035c531b09d94c61034 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 11 Jan 2025 14:26:22 -0500 Subject: [PATCH] Added query --- services/web/project/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/project/__init__.py b/services/web/project/__init__.py index cb3dc73..b766b25 100644 --- a/services/web/project/__init__.py +++ b/services/web/project/__init__.py @@ -647,7 +647,7 @@ def recent_actions(current_user): # RECENT_ACTIONS = "SELECT * FROM members_actions WHERE member_id = " + user_id + " ORDER by id DESC LIMIT 4" # RECENT_ACTIONS = "SELECT * FROM members_actions WHERE member_id::text = %s ORDER by id DESC LIMIT 4" # print(user_id) - RECENT_ACTIONS = "SELECT * FROM members_actions WHERE member_id = 1 ORDER by id DESC LIMIT 4" + RECENT_ACTIONS = f"SELECT * FROM members_actions WHERE member_id = {user_id} ORDER by id DESC LIMIT 4" actionVal = (user_id) with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor: cursor.execute(RECENT_ACTIONS) @@ -667,7 +667,7 @@ def recent_actions(current_user): {"no": "3", "description": "Web Traffic Analysis" , "date": "10-12-2010 11:30 AM", "status": 'verifying'}, ] } - return jsonify(action_data=action_data) + return jsonify(action_data=action_data, recent_actions=recent_actions) @app.route("/panel/account/products/url") @token_required