Address Coderabbit items.

This commit is contained in:
Adam Outler
2026-01-25 23:03:23 +00:00
parent 72c29a0d2d
commit 67b307f0e7
6 changed files with 26 additions and 8 deletions

View File

@@ -38,7 +38,15 @@ Retrieve token via `get_setting_value('API_TOKEN')`.
**MANDATORY:** All responses must include `"success": true|false`
On failure, include error message:
```python
return {"success": False, "error": "Description of what went wrong"}
```
On success:
```python
return {"success": True, "data": result}
```
```python
return {"success": False, "error": "Description of what went wrong"}
@@ -50,6 +58,9 @@ On success:
return {"success": True, "data": result}
```
**Exception:** The legacy `/device/<mac>` GET endpoint does not follow this contract to maintain backward compatibility with the UI.
## Adding New Endpoints
1. Add route in `server/api_server/` directory