Insert registeration
This commit is contained in:
@@ -223,8 +223,16 @@ def start_register():
|
|||||||
is_validated = validate.validate_signup_data(data.get('firstname'), data.get('lastname'), data.get('email'))
|
is_validated = validate.validate_signup_data(data.get('firstname'), data.get('lastname'), data.get('email'))
|
||||||
if is_validated is not True:
|
if is_validated is not True:
|
||||||
return dict(message='Invalid data', data=None, error=is_validated), 400
|
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")
|
return jsonify(hello="ameye signup path world")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user