Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Akalanka47000 authored Mar 10, 2024
2 parents 4df196b + cda1b96 commit 4be9414
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/mongoose-audit/src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const options = {
};

const addAuditLogObject = (currentObject, original) => {
const user = currentObject.__user || options.getUser?.() || "Unknown User";
const user = currentObject.__user || options.getUser?.() || "Unknown";
delete currentObject.__user;
let changes = deepDiff(JSON.parse(JSON.stringify(original ?? {})), JSON.parse(JSON.stringify(currentObject ?? {})), filter);
if (changes?.length) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/mongoose-audit/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe("audit", function () {
const entry = audit[0];
expect(entry.changes["name"].to).toBe("Lucky");
expect(entry.changes["name"].type).toBe(AuditType.Add);
expect(entry.user).toBe("Unknown User")
expect(entry.user).toBe("Unknown")
expect(entry.entity).toBe("Test")
})
});
Expand Down

0 comments on commit 4be9414

Please sign in to comment.