mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 11:40:25 +00:00
Merge branch 'viirus/androidFixes' into release
This commit is contained in:
commit
8bfafa6df0
3 changed files with 5 additions and 2 deletions
|
|
@ -34,6 +34,7 @@ describe('POST /user/auth/local/register', () => {
|
|||
expect(user.apiToken).to.exist;
|
||||
expect(user.auth.local.username).to.eql(username);
|
||||
expect(user.profile.name).to.eql(username);
|
||||
expect(user.newUser).to.eql(true);
|
||||
});
|
||||
|
||||
it('provides default tags and tasks', async () => {
|
||||
|
|
|
|||
|
|
@ -159,7 +159,9 @@ api.registerLocal = {
|
|||
if (existingUser) {
|
||||
res.respond(200, savedUser.toJSON().auth.local); // We convert to toJSON to hide private fields
|
||||
} else {
|
||||
res.respond(201, savedUser);
|
||||
let userJSON = savedUser.toJSON();
|
||||
userJSON.newUser = true;
|
||||
res.respond(201, userJSON);
|
||||
}
|
||||
|
||||
// Clean previous email preferences and send welcome email
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ function _setUpNewUser (user) {
|
|||
user.purchased.background.violet = true;
|
||||
user.preferences.background = 'violet';
|
||||
|
||||
if (user.registeredThrough === 'habitica-web' || user.registeredThrough === 'habitica-android') {
|
||||
if (user.registeredThrough === 'habitica-web') {
|
||||
taskTypes = ['habit', 'daily', 'todo', 'reward', 'tag'];
|
||||
|
||||
_.each(iterableFlags.tutorial.common, (val, section) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue