From fcb54adb5f3e9901bbd4fffcae96ba44752b10e0 Mon Sep 17 00:00:00 2001 From: Rui Alves Date: Sat, 21 Sep 2024 16:12:09 +0100 Subject: [PATCH] Fix endpoint --- frigate/api/app.py | 2 +- frigate/test/test_http.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frigate/api/app.py b/frigate/api/app.py index 002e6d048..ec9caa2fd 100644 --- a/frigate/api/app.py +++ b/frigate/api/app.py @@ -65,7 +65,7 @@ def go2rtc_streams(): return JSONResponse(content=stream_data) -@router.get("/go2rtc/streams/") +@router.get("/go2rtc/streams/{camera_name}") def go2rtc_camera_stream(camera_name: str): r = requests.get( f"http://127.0.0.1:1984/api/streams?src={camera_name}&video=all&audio=allµphone" diff --git a/frigate/test/test_http.py b/frigate/test/test_http.py index f749429a3..8e5997a0e 100644 --- a/frigate/test/test_http.py +++ b/frigate/test/test_http.py @@ -130,6 +130,7 @@ class TestHttp(unittest.TestCase): with TestClient(app) as client: _insert_mock_event(id) + # TODO: Rui. All the tests are now broken since there's no .json in the FastAPI client.get/post requests events = client.get("/events").json assert events assert len(events) == 1