interface instead of type
This commit is contained in:
1
dist/main.js
vendored
1
dist/main.js
vendored
@ -11,6 +11,7 @@ class Dispatcher {
|
||||
exec() {
|
||||
log.info("Dispatcher starting");
|
||||
this._mqttClient.exec();
|
||||
log.info("Dispatcher running");
|
||||
}
|
||||
}
|
||||
const dispatcher = new Dispatcher();
|
||||
|
3
dist/mqttclient.js
vendored
3
dist/mqttclient.js
vendored
@ -26,6 +26,9 @@ class MqttClient {
|
||||
for (let topicHandler of this._topicHandlers) {
|
||||
if (this.topicMatch(topicHandler.topic, topic)) {
|
||||
log.info(`received topic ${topic} matches registered topic ${topicHandler.topic}`);
|
||||
if (topicHandler.callback != null) {
|
||||
topicHandler.callback(payload);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user