mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-18 07:42:08 +08:00
api_get: keep same api (#21838)
old-commit-hash: 267a0b343b0ad607ee0cddcf62de5e18966d4390
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user