Skip to content
Snippets Groups Projects
Commit 4aa043fd authored by Marco Malavolti's avatar Marco Malavolti
Browse files

Fixed error on API

parent dbfa7b1d
Branches
Tags
No related merge requests found
...@@ -5,10 +5,9 @@ import logging ...@@ -5,10 +5,9 @@ import logging
import re import re
import eccs_properties as e_p 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 import Flask, request, jsonify
from flask_restful import Resource, Api 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 from markupsafe import escape
app = Flask(__name__) app = Flask(__name__)
...@@ -204,7 +203,7 @@ class EccsResults(Resource): ...@@ -204,7 +203,7 @@ class EccsResults(Resource):
# /api/fedstats # /api/fedstats
class FedStats(Resource): class FedStats(Resource):
def get(self): 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) regAuthDict = get_reg_auth_dict(list_feds)
file_path = f"{e_p.ECCS_OUTPUTDIR}/{e_p.ECCS_RESULTSLOG}" file_path = f"{e_p.ECCS_OUTPUTDIR}/{e_p.ECCS_RESULTSLOG}"
...@@ -283,7 +282,7 @@ class Help(Resource): ...@@ -283,7 +282,7 @@ class Help(Resource):
@app.route('/getsamlreq') @app.route('/getsamlreq')
def getSamlReq(): def getSamlReq():
# Setup list_eccs_idps # 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_idp = request.args.get('idp')
entityid_sp = request.args.get('sp') entityid_sp = request.args.get('sp')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment