From 2bab42858d751f112cba46c687419c2d83b2ab37 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Tue, 7 Jan 2025 09:56:22 -0500 Subject: [PATCH] counmtry --- services/web/project/__init__.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/services/web/project/__init__.py b/services/web/project/__init__.py index 9dc783c..d534540 100644 --- a/services/web/project/__init__.py +++ b/services/web/project/__init__.py @@ -344,20 +344,26 @@ def verify_register(): except: return jsonify({'status': 'INVALID', 'message': 'Link is invalid'}),403 - print(data) - print(data['user']) - print(data['user']['uid']) +# print(data) +# print(data['user']) +# print(data['user']['uid']) - user_uid = 'a4b75649-e3c5-424f-bcdb-5481e625d24b' - FIND_USER_DETAIL= "SELECT firstname,lastname,email FROM members_pending WHERE uid::text = '"+user_uid+"'" + country = { + [ + {"code":"US","description": "United States", }, + {"code":"NG","description": "Nigeria", }, + ] + } + user_uid = data['user']['uid'] + #'a4b75649-e3c5-424f-bcdb-5481e625d24b' + FIND_USER_DETAIL= "SELECT firstname,lastname,email, uid FROM members_pending WHERE uid::text = '"+user_uid+"'" with connection: with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor: cursor.execute(FIND_USER_DETAIL) account = cursor.fetchall() print(account[0]) - - return jsonify(status="VALID", user=account[0], pending_uid=user_uid,country=[]) + return jsonify(status="VALID", user=account[0], pending_uid=user_uid,country=country) @app.route("/panel/auth/reset", methods=["POST"])