Commit 61dd0635 authored by Luis Acosta's avatar Luis Acosta

Version 1.0.3

parent 52cfc855
......@@ -36,7 +36,7 @@ fecha_hora = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
@app.route('/')
def home():
return jsonify({"Mensaje":"Hola"}), 200
return jsonify({"error": "Error Access"}), 401
#return jsonify(resultado)
@app.route('/login', methods=['POST'])
......@@ -162,7 +162,7 @@ def Generate_Campaign():
response = callcenter.search_campaing(camp_id_search)
data = response.json()['id']
insert=callcenter.insert_number_campaing(data,campaign_fields,campaign_data)
print(insert)
#print(insert)
data_response = json.loads(insert)["status"]
......@@ -173,7 +173,7 @@ def Generate_Campaign():
else:
callcenter = Callcenter(api_key, cc_url)
cread_camp=callcenter.created_campaing(camp_name,date_ini_camp,time_ini_camp,date_fin_camp,time_fin_camp,campaign_queue,camp_obsv)
print(cread_camp)
#print(cread_camp)
return jsonify({"mensaje": f"No Encontrado Campaing , {camp_name}! Se debe crear una campaña"}), 401
......@@ -193,7 +193,7 @@ def Consult_Campaign():
callcenter = Callcenter(api_key, cc_url)
consult_calls=callcenter.consult_campaing(campaign_id,campaign_date_ini,campaign_date_fin)
data_response = json.loads(consult_calls)["hydra:member"]
print(data_response)
#print(data_response)
raw_json = data_response[0]
#return jsonify({"mensaje": f"Datos Ingresados , {dataCollection} ;{campaign_id};{campaign_date_ini};{campaign_date_fin}"}), 401
......@@ -262,7 +262,3 @@ def acceso():
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment