mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
#5232 some tweaks to flag history saving
This commit is contained in:
12
src/flags.js
12
src/flags.js
@@ -341,9 +341,19 @@ Flags.getHistory = function (flagId, callback) {
|
||||
// Deserialise field object
|
||||
var fields = entry.value[1].map(function (field) {
|
||||
field = field.toString().split(':');
|
||||
|
||||
switch (field[0]) {
|
||||
case 'state':
|
||||
field[1] = field[1] === undefined ? null : '[[flags:state-' + field[1] + ']]';
|
||||
break;
|
||||
|
||||
default:
|
||||
field[1] = field[1] === undefined ? null : field[1];
|
||||
break;
|
||||
}
|
||||
return {
|
||||
"attribute": field[0],
|
||||
"value": field[1] === undefined ? null : field[1]
|
||||
"value": field[1]
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user