mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Storage object null when adding twitter credentials as first ever node
This commit is contained in:
@@ -207,6 +207,10 @@ var credentials = {};
|
|||||||
|
|
||||||
module.exports.addCredentials = function(id,creds) {
|
module.exports.addCredentials = function(id,creds) {
|
||||||
credentials[id] = creds;
|
credentials[id] = creds;
|
||||||
|
if (!storage) {
|
||||||
|
// Do this lazily to ensure the storage provider as been initialised
|
||||||
|
storage = require("./storage");
|
||||||
|
}
|
||||||
storage.saveCredentials(credentials);
|
storage.saveCredentials(credentials);
|
||||||
}
|
}
|
||||||
module.exports.getCredentials = function(id) {
|
module.exports.getCredentials = function(id) {
|
||||||
|
Reference in New Issue
Block a user