mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Storage object null when adding twitter credentials as first ever node
This commit is contained in:
parent
1967046cc8
commit
3054b04378
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user