mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Restructure how editor/git settings are saved in userSettings
This commit is contained in:
@@ -165,17 +165,18 @@ var persistentSettings = {
|
||||
});
|
||||
},
|
||||
getUserSettings: function(username) {
|
||||
console.log(username);
|
||||
return userSettings[username];
|
||||
return clone(userSettings[username]);
|
||||
},
|
||||
setUserSettings: function(username,settings) {
|
||||
var current = userSettings[username];
|
||||
userSettings[username] = settings;
|
||||
try {
|
||||
assert.deepEqual(current,settings);
|
||||
console.log("skip the save");
|
||||
return when.resolve();
|
||||
} catch(err) {
|
||||
globalSettings.users = userSettings;
|
||||
console.log("saving");
|
||||
return storage.saveSettings(globalSettings);
|
||||
}
|
||||
}
|
||||
|
@@ -53,7 +53,6 @@ Project.prototype.load = function () {
|
||||
this.credentialSecret = projectSettings.credentialSecret;
|
||||
this.git = projectSettings.git || { user:{} };
|
||||
|
||||
console.log("LOADED",this.git);
|
||||
// this.paths.flowFile = fspath.join(this.path,"flow.json");
|
||||
// this.paths.credentialsFile = fspath.join(this.path,"flow_cred.json");
|
||||
|
||||
|
Reference in New Issue
Block a user