Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions server/controllers/controllerUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const generateJwt = (user, res, code, message, field, status) => {
// We don't want to store the sensitive information such as the
// user password in the token so we pick only the email and id
const payload = {
email: user.email
email: user.email,
};

// eslint-disable-next-line consistent-return
Expand All @@ -64,7 +64,8 @@ const generateJwt = (user, res, code, message, field, status) => {
return res.status(200).json({
user: destructUser(user),
accessToken: `Bearer ${token}`,
expiresIn: '24h'
expiresIn: '24h',
message: 'User fetch successful',
});
});
};
Expand Down