Skip to content

Commit

Permalink
fix JSON nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
Amy Chen authored and Amy Chen committed Dec 24, 2024
1 parent a3dbe86 commit 1cb15c2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/helpers/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,19 +588,20 @@ export function writeToLog(message, level, params) {
username: userId
};
}
}

if (Object.keys(logParams).indexOf("DEA") === -1) {
const dea = getDEAFromAccessToken();
if (dea) {
logParams.DEA = dea;
if (!logParams.user) {
logParams.user = {};
}
logParams.user.DEA = dea;
}
}

if (Object.keys(logParams).indexOf("roles") === -1) {
const roles = getRealmRolesFromAccessToken();
if (roles) {
logParams.roles = roles;
if (!logParams.user) {
logParams.user = {};
}
logParams.user.roles = roles;
}
}

Expand Down

0 comments on commit 1cb15c2

Please sign in to comment.