From 26d34da314d2beb1ba7c95cfc28e2c59afa97380 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/athena/athenad.py | 2 +- selfdrive/ui/qt/api.h | 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 79875023a23b50..0c217aef222adb 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/athena/athenad.py b/selfdrive/athena/athenad.py index 989e284e748401..0d359fe968564c 100755 --- a/selfdrive/athena/athenad.py +++ b/selfdrive/athena/athenad.py @@ -41,7 +41,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/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/tools/lib/api.py b/tools/lib/api.py index 6ff9242f29810c..977232863d02d9 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")