def post(self): cl = client() content = request.get_json() cl.enviroment = int(content.get('enviroment')) cl.identification = content.get('identification') answer = cl.search_client() return jsonify(answer), 200
def get(self): cl = client() content = request.get_json() cl.enviroment = content.get('enviroment') answer = cl.show_clients() if (answer): return jsonify(answer), 200 else: return jsonify(), 400
def post(self): cl = client() content = request.get_json() cl.identification = content.get('identification') answer = cl.consult_client() if (answer): return jsonify(answer), 200 else: return jsonify(), 400
def post(self): cl = client() content = request.get_json() cl.enviroment = int(content.get('enviroment')) cl.identification = content.get('identification') answer = cl.show_history() if (answer): return jsonify(answer), 200 else: return jsonify(), 400
def get(self): cl = client() content = request.get_json() cl.id = int(content.get('id')) cl.enviroment = int(content.get('enviroment')) answer = cl.search_clients() if (answer): return jsonify(answer), 200 else: return jsonify(), 400
def post(self): cl = client() content = request.get_json() cl.name = content.get('name') cl.surname = content.get('surname') cl.email = content.get('email') cl.phone = content.get('phone') cl.address = content.get('address') cl.enviroment = int(content.get('enviroment')) cl.identification = content.get('identification') answer = cl.edit_client() return jsonify(answer), 200
def post(self): cl = client() content = request.get_json() cl.enviroment = int(content.get('enviroment')) answer = cl.show_clients() return jsonify(answer), 200