mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Nodes must not require(settings) themselves
They should access settings via RED.settings
This commit is contained in:
parent
0e955ea120
commit
97dbe8da0c
@ -24,7 +24,7 @@ var util = require('util');
|
|||||||
// module.exports = {prowlkey:'My-API-KEY'}
|
// module.exports = {prowlkey:'My-API-KEY'}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var pushkey = require(process.env.NODE_RED_HOME+"/settings").prowl || require(process.env.NODE_RED_HOME+"/../pushkey.js");
|
var pushkey = RED.settings.prowl || require(process.env.NODE_RED_HOME+"/../pushkey.js");
|
||||||
}
|
}
|
||||||
catch(err) {
|
catch(err) {
|
||||||
util.log("[57-prowl.js] Error: Failed to load Prowl credentials");
|
util.log("[57-prowl.js] Error: Failed to load Prowl credentials");
|
||||||
|
Loading…
Reference in New Issue
Block a user