Skip to content

Commit

Permalink
[SWIK-2275_users_display_name] Added displayName to cookie (not worki…
Browse files Browse the repository at this point in the history
…ng on my machine)
  • Loading branch information
TBoonX committed Jul 16, 2018
1 parent 1f7d822 commit fd4fbdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion plugins/UserStorage/userStoragePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ module.exports = function userStoragePlugin(options) {
let preparedUser = {
username: newUser.username,
userid: newUser.userid,
displayName: newUser.displayName,
jwt: newUser.jwt
};

// console.log('userStoragePlugin actionContext setUser:', newUser);
// console.log('userStoragePlugin actionContext setUser:', preparedUser);

user = preparedUser;

Expand Down
6 changes: 4 additions & 2 deletions services/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export default {
callback(null, {
username: JSON.parse(res.body).username,
userid: JSON.parse(res.body).userid,
jwt: res.headers['----jwt----']
jwt: res.headers['----jwt----'],
displayName: JSON.parse(res.body).displayName
});
})
.catch((err) => {
Expand Down Expand Up @@ -100,7 +101,8 @@ export default {
callback(null, {
username: JSON.parse(res.body).username,
userid: JSON.parse(res.body).userid,
jwt: res.headers['----jwt----']
jwt: res.headers['----jwt----'],
displayName: JSON.parse(res.body).displayName
});
})
.catch((err) => {
Expand Down

0 comments on commit fd4fbdf

Please sign in to comment.