Added authentication logic

This commit is contained in:
Tarun Singh 2021-11-16 20:44:10 -05:00
parent 3721d11259
commit 3f5133d1ba
4 changed files with 48 additions and 12 deletions

View file

@ -321,7 +321,7 @@ class Monitor extends BeanModel {
}
} else if (this.type === "mqtt") {
try {
bean.msg = await mqttAsync(this.url, this.topic, this.successMessage);
bean.msg = await mqttAsync(this.url, this.mqttPort, this.mqttUsername, this.mqttPassword, this.mqttTopic, this.mqttSuccessMessage);
bean.status = UP;
} catch (error) {
bean.status = DOWN;