7.80.0 — Émission d'événements vers le journal du service d'agents (Lot 2)
FlowDeck CI / lint (push) Failing after 1m29s
FlowDeck CI / test (push) Failing after 29m9s
FlowDeck CI / docker (push) Skipped

This commit is contained in:
Spark
2026-10-22 20:25:36 +00:00
parent e459b0f9b2
commit 851a7b17d2
11 changed files with 471 additions and 1 deletions
+3
View File
@@ -118,6 +118,9 @@ def create_collection_api(request: Request, body: dict = Body(default={})):
conn.commit()
run_event_sync(fire_event("collection.created", {"collection_id": collection_id, "name": name, "icon": icon}))
from app.services.agent_evenements import emettre, url_collection
emettre("flowdeck.collection.created", f"collection:{collection_id}", name,
url=url_collection(collection_id), actor="user")
return {"id": collection_id, "name": name, "status": "created"}
+3
View File
@@ -119,4 +119,7 @@ def create_page_api(request: Request, collection_id: int, body: dict = Body(defa
"collection_id": collection_id,
"title": title,
}))
from app.services.agent_evenements import emettre, url_collection
emettre("flowdeck.page.created", f"page:{page_id}", title,
url=url_collection(collection_id), actor="user")
return {"id": page_id, "title": title, "status": "created"}
+6
View File
@@ -149,6 +149,9 @@ def update_page_api(request: Request, page_id: int, body: dict = Body(default={}
user = _current_user(request)
notify_assignment(existing["collection_id"], page_id, title,
stored, props, user.get("id"))
from app.services.agent_evenements import emettre, url_collection
emettre("flowdeck.page.updated", f"page:{page_id}", title,
url=url_collection(existing["collection_id"]), actor="user")
return {"id": page_id, "status": "updated"}
@@ -178,6 +181,9 @@ def delete_page_api(request: Request, page_id: int):
"page_id": page_id,
"collection_id": existing["collection_id"],
}))
from app.services.agent_evenements import emettre, url_collection
emettre("flowdeck.page.deleted", f"page:{page_id}", existing["title"],
url=url_collection(existing["collection_id"]), actor="user")
return {"id": page_id, "status": "deleted"}