def sign_up(): email = request.form['email'] password = request.form['password'] first_name = request.form['first_name'] family_name = request.form['family_name'] gender = request.form['gender'] city = request.form['city'] country = request.form['country'] if database_helper.userExist(email): return jsonify({"success": False, "message": "User already exists!"}) else: database_helper.sign_up_user(email, password, first_name, family_name, gender, city, country) return jsonify({"success": True, "message": "User created!"})
def sign_up(): params = request.json return json.dumps(database_helper.sign_up_user(params))