From 76adcdfbb4de72bf28471315fe7ac280e64639d3 Mon Sep 17 00:00:00 2001 From: Andrew McWatters Date: Fri, 12 Apr 2024 09:55:41 -0700 Subject: [PATCH] Use comma-api-server --- common/api/__init__.py | 2 +- selfdrive/ui/qt/api.h | 2 +- system/athena/athenad.py | 2 +- tools/lib/api.py | 2 +- tools/scripts/fetch_image_from_route.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/api/__init__.py b/common/api/__init__.py index ac231400a47cc7..47c053012bb588 100644 --- a/common/api/__init__.py +++ b/common/api/__init__.py @@ -5,7 +5,7 @@ from openpilot.system.hardware.hw import Paths from openpilot.system.version import get_version -API_HOST = os.getenv('API_HOST', 'https://api.commadotai.com') +API_HOST = os.getenv('API_HOST', 'https://www.andrewmcwatters.org/comma-api') class Api: def __init__(self, dongle_id): diff --git a/selfdrive/ui/qt/api.h b/selfdrive/ui/qt/api.h index ad64d7e7228320..9af557ea86d0f3 100644 --- a/selfdrive/ui/qt/api.h +++ b/selfdrive/ui/qt/api.h @@ -9,7 +9,7 @@ namespace CommaApi { -const QString BASE_URL = util::getenv("API_HOST", "https://api.commadotai.com").c_str(); +const QString BASE_URL = util::getenv("API_HOST", "https://www.andrewmcwatters.org/comma-api").c_str(); QByteArray rsa_sign(const QByteArray &data); QString create_jwt(const QJsonObject &payloads = {}, int expiry = 3600); diff --git a/system/athena/athenad.py b/system/athena/athenad.py index 52e3a29ac8653f..5476b9339655b8 100755 --- a/system/athena/athenad.py +++ b/system/athena/athenad.py @@ -42,7 +42,7 @@ from openpilot.system.hardware.hw import Paths -ATHENA_HOST = os.getenv('ATHENA_HOST', 'wss://athena.comma.ai') +ATHENA_HOST = os.getenv('ATHENA_HOST', 'wss://www.andrewmcwatters.org/athena') HANDLER_THREADS = int(os.getenv('HANDLER_THREADS', "4")) LOCAL_PORT_WHITELIST = {8022} diff --git a/tools/lib/api.py b/tools/lib/api.py index 92a75d2a3b6abd..15c4de45698a15 100644 --- a/tools/lib/api.py +++ b/tools/lib/api.py @@ -1,6 +1,6 @@ import os import requests -API_HOST = os.getenv('API_HOST', 'https://api.commadotai.com') +API_HOST = os.getenv('API_HOST', 'https://www.andrewmcwatters.org/comma-api') class CommaApi: def __init__(self, token=None): diff --git a/tools/scripts/fetch_image_from_route.py b/tools/scripts/fetch_image_from_route.py index b59e7c895e7693..e28e15c5f697d4 100755 --- a/tools/scripts/fetch_image_from_route.py +++ b/tools/scripts/fetch_image_from_route.py @@ -24,7 +24,7 @@ frame = int(sys.argv[3]) camera = cameras[sys.argv[4]] if len(sys.argv) > 4 and sys.argv[4] in cameras else "cameras" -url = f'https://api.commadotai.com/v1/route/{route}/files' +url = f'https://www.andrewmcwatters.org/comma-api/v1/route/{route}/files' r = requests.get(url, headers={"Authorization": f"JWT {jwt}"}, timeout=10) assert r.status_code == 200 print("got api response")