mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-02 08:12:21 -07:00
Address Coderabbit items.
This commit is contained in:
13
.github/skills/api-development/SKILL.md
vendored
13
.github/skills/api-development/SKILL.md
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user