Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tianj7 committed Feb 1, 2024
1 parent 6ea2bf0 commit a499e02
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/argowrapper/routes/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ def wrapper(*args, **kwargs):
logger.info("arguments:")
logger.info(json.dumps(kwargs["request_body"]))
request = kwargs["request"]
request_body = kwargs["request_body"]
token = request.headers.get("Authorization")
host = request
request_body = kwargs["request_body"]

team_project = request_body[TEAM_PROJECT_FIELD_NAME]
cohort_ids = []
source_id = request_body["source_id"]
Expand All @@ -170,8 +172,8 @@ def wrapper(*args, **kwargs):
cohort_ids.extend(v["cohort_ids"])

if team_project and source_id and len(team_project) > 0 and len(cohort_ids) > 0:
header = {"cookie": "fence={}".format(token)}
url = "http://cohort-middleware-service/cohortdefinition-stats/by-source-id/{}/by-team-project?team-project={}".format(
header = {"Authorization": token, "cookie": "fence={}".format(token)}
url = "https://{}/cohort-middleware/cohortdefinition-stats/by-source-id/{}/by-team-project?team-project={}".format(
source_id, team_project
)

Expand Down

0 comments on commit a499e02

Please sign in to comment.