Skip to content

Commit 56190fb

Browse files
authored
Merge pull request #5744 from Countly/SER-2013-exported-audit-logs-from-ui-should-have-also-before-and-after-fields
[SER-2013] Exported audit logs from UI should have also BEFORE and AFTER fields
2 parents 1d0e42b + c32a12e commit 56190fb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

plugins/systemlogs/api/api.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,13 @@ plugins.setConfigs("systemlogs", {
155155
if (info.name) {
156156
res[i].name = info.name;
157157
}
158+
if (info.before || info.after) {
159+
res[i].before = JSON.stringify(info.before);
160+
res[i].after = JSON.stringify(info.after);
161+
}
162+
else {
163+
res[i].value = JSON.stringify(info);
164+
}
158165
}
159166
}
160167
common.returnOutput(paramsNew, {sEcho: paramsNew.qstring.sEcho, iTotalRecords: Math.max(total, 0), iTotalDisplayRecords: count, aaData: res});
@@ -477,4 +484,4 @@ plugins.setConfigs("systemlogs", {
477484
}
478485
}(pluginOb));
479486

480-
module.exports = pluginOb;
487+
module.exports = pluginOb;

0 commit comments

Comments
 (0)