diff --git a/common.py b/common.py index 021814e..30286e4 100644 --- a/common.py +++ b/common.py @@ -219,9 +219,9 @@ def api_get_status(name, api, api_token): try: match = re.match(r"[ew]\d{3}[ns]\d{2}", name) if match != None: - response = requests.post(api, data={'auth': token, 'action': 'status', 'area': name}, headers={"lAccept": "application/json", "Content-Type": "application/x-www-form-urlencoded"}) + response = requests.post(api, data={'auth': api_token, 'action': 'status', 'area': name}, headers={"lAccept": "application/json", "Content-Type": "application/x-www-form-urlencoded"}) else: - response = requests.post(api, data={'auth': token, 'action': 'status', 'tile': name}, headers={"lAccept": "application/json", "Content-Type": "application/x-www-form-urlencoded"}) + response = requests.post(api, data={'auth': api_token, 'action': 'status', 'tile': name}, headers={"lAccept": "application/json", "Content-Type": "application/x-www-form-urlencoded"}) if response.ok and response.json()["success"] == True: match = re.match(r"pending|done|rebuild|skip|started|packaged", response.json()["status"]) if match != None: