From 664ffa6134c0aae138720307020693ed08886ab1 Mon Sep 17 00:00:00 2001 From: HerrHase Date: Tue, 10 Mar 2026 10:13:20 +0100 Subject: [PATCH] adding small changes, adding example and readme for xmpp --- README_XMPP.md | 7 +++++-- packages/server/actions/action.js | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README_XMPP.md b/README_XMPP.md index 52047c4..9ac36d2 100644 --- a/README_XMPP.md +++ b/README_XMPP.md @@ -1,7 +1,7 @@ # Signpost / Xmpp -Using Signpost to send you messages for Debugging, as Warning, status of Deploy or Critical Errors from -Services or Server. +Using Signpost to send messages for Debugging, as Warning, status of Deploy or Critical Errors from +Services or Server to an Xmpp-Server. ## Messages @@ -21,3 +21,6 @@ curl -X POST https:///api/flow/v1/ -H 'Authorization: Bearer ' -d '{"message":""}' ``` + +### PHP +### Nodejs diff --git a/packages/server/actions/action.js b/packages/server/actions/action.js index eff3215..3b2015f 100644 --- a/packages/server/actions/action.js +++ b/packages/server/actions/action.js @@ -10,14 +10,17 @@ class Action { /** * + * @param flow object + * @param data object * */ constructor(flow, data) { this.flow = flow this.data = data - if (!this.run()) { - throw new Error('run method needed') + // check if class has a run method + if (typeof this.run !== 'function') { + throw new Error('missing run method') } } }