Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 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
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 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
Ejemplo n.º 5
0
 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
Ejemplo n.º 6
0
 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
Ejemplo n.º 7
0
 def post(self):
     cl = client()
     content = request.get_json()
     cl.enviroment = int(content.get('enviroment'))
     answer = cl.show_clients()
     return jsonify(answer), 200