updating api routing

This commit is contained in:
ari committed 2022-05-16 15:38:13 -04:00
1 parent dc726ff184
commit 0be03b1536
7 files changed
+53 -63

No files matched your search

+2 -2
View File
@@ -25,11 +25,11 @@ def make_automation_router(automations: AutomationManager) -> APIRouter:
),
)
@router.post("")
@router.post("/item")
def upsert_auto(body: UpdateAutoRequest):
automations.update(body.index, body.data)
@router.delete("")
@router.delete("/item")
def delete_auto(body: DeleteAutoRequest):
try:
automations.delete(body.index)