From f8173c644dada08f32a380755788dbed205f068b Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Wed, 8 Jan 2025 08:25:05 -0500 Subject: [PATCH] search username --- services/web/project/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/web/project/__init__.py b/services/web/project/__init__.py index 1228cc7..231cec1 100644 --- a/services/web/project/__init__.py +++ b/services/web/project/__init__.py @@ -370,7 +370,7 @@ def complete_register(): if not vrl: return jsonify({'message': 'Error - missing verify link'}), 403 try: - data= jwt.decode(vrl, app.config['SECRET_KEY'], algorithms=["HS256"]) + pending_data = jwt.decode(vrl, app.config['SECRET_KEY'], algorithms=["HS256"]) except: return jsonify({'status': 'INVALID', 'message': 'Link is invalid'}),403 @@ -378,10 +378,10 @@ def complete_register(): if is_validated is not True: return dict(message='Invalid data', data=None, error=is_validated), 400 - print(data) - username= data.get('username') - password= data.get('password') - country= data.get('country') + print(pending_data) + username= data['username'] + password= data['password'] + country= data['country'] FIND_USERNAME= f"SELECT * FROM members WHERE username::text = '{username}' " print(FIND_USERNAME)