DOCS+BE: skill updates, write_notifications fix #1793

This commit is contained in:
jokob-sk committed 2026-09-18 08:20:31 +10:00
1 parent 52d1698221
commit 3bf10f8378
4 files changed
+65 -9

No files matched your search

+5 -9
View File
@@ -1909,15 +1909,11 @@ def metrics(payload=None):
tags=["messaging"],
auth_callable=is_authorized
)
def api_write_notification(payload=None):
data = request.json or {}
content = data.get("content")
level = data.get("level", "alert")
if not content:
return jsonify({"success": False, "message": "ERROR: Missing parameters", "error": "Missing content"}), 400
write_notification(content, level)
def api_write_notification(payload: CreateNotificationRequest = None):
# Use the validated payload, not the raw request body - CreateNotificationRequest's
# truncate_content validator runs against payload.content; re-reading request.json
# directly would silently bypass it and store the untruncated original.
write_notification(payload.content, payload.level)
return jsonify({"success": True})