diff --git a/api.py b/api.py index 50dfb746da334f06d2178504eb9d43f1e002db33..c55d3a36c00ddef1bc32f7fb9b5d9879caaf96f0 100755 --- a/api.py +++ b/api.py @@ -5,10 +5,9 @@ import logging import re import eccs_properties as e_p -#from eccs_properties import DAY, ECCS_LOGSDIR, ECCS_OUTPUTDIR, ECCS_LISTFEDSURL, ECCS_LISTFEDSFILE, ECCS_RESULTSLOG from flask import Flask, request, jsonify from flask_restful import Resource, Api -from utils import get_logger, get_list_feds, get_list_eccs_idps, get_reg_auth_dict, generate_login_url +from utils import get_logger, get_list_from_url, get_reg_auth_dict, generate_login_url from markupsafe import escape app = Flask(__name__) @@ -204,7 +203,7 @@ class EccsResults(Resource): # /api/fedstats class FedStats(Resource): def get(self): - list_feds = get_list_feds(e_p.ECCS_LISTFEDSURL, e_p.ECCS_LISTFEDSFILE) + list_feds = get_list_from_url(e_p.ECCS_LISTFEDSURL, e_p.ECCS_LISTFEDSFILE) regAuthDict = get_reg_auth_dict(list_feds) file_path = f"{e_p.ECCS_OUTPUTDIR}/{e_p.ECCS_RESULTSLOG}" @@ -283,7 +282,7 @@ class Help(Resource): @app.route('/getsamlreq') def getSamlReq(): # Setup list_eccs_idps - list_eccs_idps = get_list_eccs_idps(e_p.ECCS_LISTIDPSURL, e_p.ECCS_LISTIDPSFILE) + list_eccs_idps = get_list_from_url(e_p.ECCS_LISTIDPSURL, e_p.ECCS_LISTIDPSFILE) entityid_idp = request.args.get('idp') entityid_sp = request.args.get('sp')