webui: fixes for machines endpoint

- fix machines settings file location
- raise 404 if machine doesn't exist
- improve machine api test
This commit is contained in:
DavHau
2023-08-26 14:17:25 +02:00
parent 2b2584a0ba
commit 8c7ee25dc9
4 changed files with 45 additions and 17 deletions

View File

@@ -9,3 +9,7 @@ def machines_folder() -> Path:
def machine_folder(machine: str) -> Path:
return machines_folder() / machine
def machine_settings_file(machine: str) -> Path:
return machine_folder(machine) / "settings.json"