From 845b3e908a232b78d3e437a49d0dbbcedd5d1022 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Tue, 17 Dec 2024 11:46:33 -0500 Subject: [PATCH] Insert registeration --- services/web/project/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/web/project/__init__.py b/services/web/project/__init__.py index 5aa9b5e..730b00d 100644 --- a/services/web/project/__init__.py +++ b/services/web/project/__init__.py @@ -223,8 +223,16 @@ def start_register(): is_validated = validate.validate_signup_data(data.get('firstname'), data.get('lastname'), data.get('email')) if is_validated is not True: return dict(message='Invalid data', data=None, error=is_validated), 400 + firstname= data.get('firstname') + lastname= data.get('lastname') + email= data.get('email') + INSERT_MEMBERS = "INSERT INTO members_pending(email,firstname,lastname) VALUES('"+firstname+"','"+lastname+"','"+email+"')" + with connection: + with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor: + cursor.execute(INSERT_MEMBERS) + return jsonify(hello="ameye signup path world") except Exception as e: