MCPcopy Create free account
hub / github.com/RawdogReverend/TermNet / new_notification

Function new_notification

backend/extensions/notification_server.py:16–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15@app.route("/new_notification", methods=["POST"])
16def new_notification():
17 data = request.json
18 if not data or "title" not in data or "message" not in data:
19 return jsonify({"error": "Missing title or message"}), 400
20
21 notif = {
22 "title": data["title"],
23 "message": data["message"],
24 "timestamp": time.time(),
25 "reminder_time": data.get("reminder_time")
26 }
27 _notifications.append(notif)
28 return jsonify(notif), 201
29
30@app.route("/list_notifications", methods=["GET"])
31def list_notifications():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected