api_get: keep same api (#21838)

old-commit-hash: 267a0b343b0ad607ee0cddcf62de5e18966d4390
This commit is contained in:
Willem Melching
2021-08-03 15:33:41 +02:00
committed by GitHub
parent ceb40d8384
commit 705988abb5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -43,4 +43,4 @@ def api_get(endpoint, method='GET', timeout=None, access_token=None, **params):
headers['User-Agent'] = "openpilot-" + version
return requests.request(method, API_HOST+endpoint, timeout=timeout, headers=headers, params=params)
return requests.request(method, API_HOST + "/" + endpoint, timeout=timeout, headers=headers, params=params)
+1 -1
View File
@@ -72,7 +72,7 @@ def register(show_spinner=False) -> str:
try:
register_token = jwt.encode({'register': True, 'exp': datetime.utcnow() + timedelta(hours=1)}, private_key, algorithm='RS256')
cloudlog.info("getting pilotauth")
resp = api_get("/v2/pilotauth/", method='POST', timeout=15,
resp = api_get("v2/pilotauth/", method='POST', timeout=15,
imei=imei1, imei2=imei2, serial=serial, public_key=public_key, register_token=register_token)
if resp.status_code in (402, 403):