doc(main): update documentation and flows
This commit is contained in:
20
dist/nodes/actions/ReadAction.js
vendored
Normal file
20
dist/nodes/actions/ReadAction.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const constants_1 = require("../constants");
|
||||
exports.default = (RED, type) => {
|
||||
class ReadAction {
|
||||
constructor(props) {
|
||||
RED.nodes.createNode(this, props);
|
||||
this.on('input', (msg) => {
|
||||
if (msg.sid) {
|
||||
msg.payload = {
|
||||
cmd: this.type.replace(`${constants_1.Constants.NODES_PREFIX}-actions `, ''),
|
||||
sid: msg.sid
|
||||
};
|
||||
this.send(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
RED.nodes.registerType(`${constants_1.Constants.NODES_PREFIX}-actions ${type}`, ReadAction);
|
||||
};
|
||||
Reference in New Issue
Block a user