mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
cleanup
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
"missingPassword": "Missing password.",
|
||||
"missingNewPassword": "Missing newPassword.",
|
||||
"wrongPassword": "Wrong password.",
|
||||
"passwordSaved": "New password has been saved.",
|
||||
"notAnEmail": "Invalid email address.",
|
||||
"emailTaken": "Email already taken.",
|
||||
"newEmailRequired": "The newEmail body parameter is required.",
|
||||
|
||||
@@ -2,7 +2,6 @@ import {
|
||||
generateUser,
|
||||
translate as t,
|
||||
} from '../../../../helpers/api-integration/v3';
|
||||
import { model as User } from '../../../../../website/src/models/user';
|
||||
|
||||
describe('POST /user/update-password', async () => {
|
||||
let endpoint = '/user/update-password';
|
||||
@@ -23,7 +22,7 @@ describe('POST /user/update-password', async () => {
|
||||
confirmPassword: newPassword,
|
||||
});
|
||||
expect(response).to.eql({});
|
||||
user = await User.findOne({ _id: user._id });
|
||||
await user.sync();
|
||||
expect(user.auth.local.hashed_password).to.not.eql(previousHashedPassword);
|
||||
});
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ api.updatePassword = {
|
||||
|
||||
user.auth.local.hashed_password = passwordUtils.encrypt(req.body.newPassword, user.auth.local.salt); // eslint-disable-line camelcase
|
||||
await user.save();
|
||||
res.send(200, {});
|
||||
res.respond(200, {});
|
||||
},
|
||||
};
|
||||
|
||||
@@ -122,7 +122,7 @@ api.updateUsername = {
|
||||
user.auth.local.username = req.body.username;
|
||||
await user.save();
|
||||
|
||||
res.send(200, { username: req.body.username });
|
||||
res.respond(200, { username: req.body.username });
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user