This commit is contained in:
Barış Soner Uşaklı
2018-12-01 16:59:20 -05:00
parent 8d7c3897f2
commit ec0c50d4e0
3 changed files with 4 additions and 3 deletions

View File

@@ -66,6 +66,7 @@
"reputation:disabled": 0,
"downvote:disabled": 0,
"disableSignatures": 0,
"min:rep:downvote": 0,
"min:rep:flag": 0,
"min:rep:profile-picture": 0,
"min:rep:cover-picture": 0,

View File

@@ -46,6 +46,8 @@ function deserialize(config) {
return deserialized;
}
Configs.deserialize = deserialize;
Configs.init = function (callback) {
var config;
async.waterfall([

View File

@@ -179,10 +179,8 @@ SocketAdmin.config.setMultiple = function (socket, data, callback) {
}
var changes = {};
data = meta.configs.deserialize(data);
Object.keys(data).forEach(function (key) {
if (typeof meta.config[key] === 'number') {
data[key] = parseInt(data[key], 10);
}
if (data[key] !== meta.config[key]) {
changes[key] = data[key];
changes[key + '_old'] = meta.config[key];