Commit bf9d9629 authored by Luis Acosta's avatar Luis Acosta

Version 1.0.3

parent 8f7c8aeb
...@@ -37,7 +37,7 @@ fecha_hora = datetime.now().strftime('%Y-%m-%d %H:%M:%S') ...@@ -37,7 +37,7 @@ fecha_hora = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
@app.route('/') @app.route('/')
def home(): def home():
return jsonify({"Mensaje":"Hola"}), 200 return jsonify({"Mensaje":"Hola"}), 200
return jsonify(resultado) #return jsonify(resultado)
@app.route('/login', methods=['POST']) @app.route('/login', methods=['POST'])
def login(): def login():
...@@ -190,19 +190,13 @@ def Consult_Campaign(): ...@@ -190,19 +190,13 @@ def Consult_Campaign():
campaign_date_ini=request_data["date_in"] campaign_date_ini=request_data["date_in"]
campaign_date_fin=request_data["date_out"] campaign_date_fin=request_data["date_out"]
#Buscar Campaña #Buscar Campaña
callcenter = Callcenter(api_key, cc_url) callcenter = Callcenter(api_key, cc_url)
consult_calls=callcenter.consult_campaing(campaign_id,campaign_date_ini,campaign_date_fin) consult_calls=callcenter.consult_campaing(campaign_id,campaign_date_ini,campaign_date_fin)
data_response = json.loads(consult_calls)["hydra:member"] data_response = json.loads(consult_calls)["hydra:member"]
print(data_response) print(data_response)
raw_json = data_response[0] raw_json = data_response[0]
#return jsonify({"mensaje": f"Datos Ingresados , {dataCollection} ;{campaign_id};{campaign_date_ini};{campaign_date_fin}"}), 401
#return jsonify({"mensaje": f"Datos Ingresados , {dataCollection} ;{campaign_id};{campaign_date_ini};{campaign_date_fin}"}), 401
return jsonify(f"{raw_json}", 200) return jsonify(f"{raw_json}", 200)
......
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