Skip to content

Commit 6c28f5e

Browse files
committed
Improved auditlogs by adding files.
1 parent e7d2b87 commit 6c28f5e

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- added `API.?.logerror()` method for printing errors into the console
99
- fixed handling of unexpected problems in the Flow with the main process becoming disconnected
1010
- fixed `uptime` value in the framework stats
11+
- improved auditlogs by adding `files`
1112

1213
========================
1314
0.0.15

index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,8 +2099,14 @@ F.audit = function(name, $, message, type) {
20992099
if ($.id)
21002100
data.action = $.id;
21012101

2102-
if ($.model)
2103-
data.data = JSON.stringify({ params: $.params, query: $.query, model: $.model }, auditjsonserialization);
2102+
let files = [];
2103+
2104+
if ($.files && $.files.length) {
2105+
for (let file of $.files)
2106+
files.push({ name: file.name, filename: file.filename, size: file.size, width: file.width, height: file.height });
2107+
}
2108+
2109+
data.data = JSON.stringify({ params: $.params, query: $.query, model: $.model, files: files }, auditjsonserialization);
21042110

21052111
if (F.clusterid)
21062112
data.instance = F.clusterid;

0 commit comments

Comments
 (0)