mirror of
https://github.com/sbender9/signalk-raymarine-autopilot.git
synced 2020-11-18 19:37:28 -08:00
user plugin.registerWithRouter
This commit is contained in:
parent
5edb73277f
commit
7e548e33a3
10
index.js
10
index.js
@ -51,10 +51,12 @@ module.exports = function(app) {
|
|||||||
debug("started")
|
debug("started")
|
||||||
};
|
};
|
||||||
|
|
||||||
plugin.executeCommand = function(json) {
|
plugin.registerWithRouter = function(router) {
|
||||||
debug("executeCommand: " + util.inspect(json, {showHidden: false, depth: null}))
|
router.post("/command", (req, res) => {
|
||||||
sendCommand(app, deviceid, json)
|
sendCommand(app, deviceid, req.body)
|
||||||
}
|
res.send("Executed command for plugin " + plugin.id)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
plugin.stop = function() {
|
plugin.stop = function() {
|
||||||
debug("stopping")
|
debug("stopping")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user