def register(): conn = db_acc.account(con_db) data = request.json sheet = acc.account( 1, data["email"], data["password"], data["nameUser"], data["dateOfBirth"], data["adress"], data["company"], ) result = conn.insert(sheet) return jsonify({"data": result}), 200
def updateInfo(): conn = db_acc.account(con_db) data = request.json sheet = acc.account( data["idOfUser"], data["email"], data["password"], data["nameUser"], data["dateOfBirth"], data["adress"], data["company"], ) result = conn.update(sheet) return jsonify({"data": result}), 200
def getAccount(): result = db_acc.account(con_db).getAccount() return jsonify({"data": result}), 200
def getAccById(): data = request.json result = db_acc.account(con_db).getAccById(data["idOfUser"]) return jsonify({"data": result}), 200
def login(): conn = db_acc.account(con_db) data = request.json result = conn.getLogin(data["email"], data["password"]) return jsonify({"data": result}), 200