def registerRoute(): content = request.json print("RegisterRoute Call") col = ["email"] values = ["'{}'".format(content['email'])] check = MySQLConnect.findUser('user', content['email']) if len(check) == 0: MySQLConnect.insert("user", ",".join(col), ",".join(values)) else: result = {"ok": "false", "id": -1} return jsonify(result) em = MySQLConnect.findByEmail('user', content['email']) result = {"ok": "true", "id": em[0][0]} return jsonify(result)
def getInfoByEmail(): content = request.json print("getInfoByEamil Route Call") results = MySQLConnect.findByEmail(content['table'], content['email']); return jsonify(results)