From 55382d000bb6dff90eca6366a92a27ad85873b74 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 15 Mar 2021 10:16:32 +0100 Subject: [PATCH] Revert "Tweak check API path" (#2718) This reverts commit e30171746bb6170fa0a8897b73c54baf4844c740. --- supervisor/api/__init__.py | 4 +++- tests/api/test_resolution.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/supervisor/api/__init__.py b/supervisor/api/__init__.py index ccbf7bae5..fc0fa4817 100644 --- a/supervisor/api/__init__.py +++ b/supervisor/api/__init__.py @@ -228,7 +228,9 @@ class RestAPI(CoreSysAttributes): self.webapp.add_routes( [ web.get("/resolution/info", api_resolution.info), - web.post("/resolution/check/{check}", api_resolution.options_check), + web.post( + "/resolution/check/{check}/options", api_resolution.options_check + ), web.post( "/resolution/suggestion/{suggestion}", api_resolution.apply_suggestion, diff --git a/tests/api/test_resolution.py b/tests/api/test_resolution.py index c5c028d5b..b155d8912 100644 --- a/tests/api/test_resolution.py +++ b/tests/api/test_resolution.py @@ -109,11 +109,11 @@ async def test_api_resolution_check_options(coresys: CoreSys, api_client): assert free_space.enabled await api_client.post( - f"/resolution/check/{free_space.slug}", json={"enabled": False} + f"/resolution/check/{free_space.slug}/options", json={"enabled": False} ) assert not free_space.enabled await api_client.post( - f"/resolution/check/{free_space.slug}", json={"enabled": True} + f"/resolution/check/{free_space.slug}/options", json={"enabled": True} ) assert free_space.enabled