Skip to content

Commit

Permalink
Merge pull request #110 from KevinBonnoron/106-lan-browser-gets-nr-to…
Browse files Browse the repository at this point in the history
…-crash-on-an-uncaught-error

106 lan browser gets nr to crash on an uncaught error
  • Loading branch information
KevinBonnoron authored Jan 16, 2024
2 parents 27623ee + 9745d0e commit 3f65467
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/common/base.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
const prettyDate = require('../helpers/date.helper');

const STATUSES = {
NOT_CONNECTED: { fill: 'red', shape: 'ring', text: 'not connected' },
CONNECTED: { fill: 'green', shape: 'dot', text: 'connected' },
NOT_CONNECTED: { fill: 'red', shape: 'ring', text: 'node-red:common.status.not-connected' },
CONNECTED: { fill: 'green', shape: 'dot', text: 'node-red:common.status.connected' },
SERVER_VALIDATION_PENDING: { fill: 'yellow', shape: 'dot', text: 'server validation pending' },
SERVER_VALIDATION_TIMEOUT: { fill: 'orange', shape: 'dot', text: 'server validation timeout' },
INVALID_CONFIGURATION: { fill: 'red', shape: 'dot', text: 'invalid configuration' },
Expand Down
6 changes: 2 additions & 4 deletions src/nodes/connection/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ module.exports = (RED) => {
super(config, RED);
}

getData(msg) {
getData() {
return {
...msg,
url: '/connection',
method: 'GET',
payload: undefined
method: 'GET'
}
}
}
Expand Down
13 changes: 0 additions & 13 deletions src/nodes/freebox-server/freebox-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ module.exports = function (RED) {
};

this._statusChanged = new EventEmitter();
node.on('close', () => this.logout());

this.init(config);
}
Expand Down Expand Up @@ -206,18 +205,6 @@ module.exports = function (RED) {
});
}

/**
* logout
*
* @return void
*/
logout() {
this.apiCall('/login/logout', { method: 'POST' }).then(() => {
RED.log.info('Session closed');
this._statusChanged.emit('session.closed');
});
}

/**
* apiCall
*
Expand Down
6 changes: 2 additions & 4 deletions src/nodes/lan-browser/lan-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ module.exports = (RED) => {
super(config, RED);
}

getData(msg) {
getData() {
return {
...msg,
url: '/lan/browser/pub',
method: 'GET',
payload: undefined
method: 'GET'
};
}
}
Expand Down

0 comments on commit 3f65467

Please sign in to comment.