mirror of
https://github.com/plankanban/planka.git
synced 2025-07-22 22:59:44 +02:00
parent
dab38cbc18
commit
7786533a90
40 changed files with 273 additions and 133 deletions
|
@ -60,12 +60,21 @@ module.exports = {
|
|||
}
|
||||
|
||||
const values = _.pick(inputs, ['password']);
|
||||
user = await sails.helpers.users.updateOne(user, values, this.req);
|
||||
user = await sails.helpers.users.updateOne(user, values, currentUser, this.req);
|
||||
|
||||
if (!user) {
|
||||
throw Errors.USER_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (user.id === currentUser.id) {
|
||||
const accessToken = sails.helpers.utils.createToken(user.id, user.passwordUpdatedAt);
|
||||
|
||||
return {
|
||||
accessToken,
|
||||
item: user,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
item: user,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue