mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 15:38:59 +00:00
return newUser as true for new local accounts
This commit is contained in:
parent
a3dd2f497e
commit
8d168a0318
1 changed files with 3 additions and 1 deletions
|
|
@ -159,7 +159,9 @@ api.registerLocal = {
|
||||||
if (existingUser) {
|
if (existingUser) {
|
||||||
res.respond(200, savedUser.toJSON().auth.local); // We convert to toJSON to hide private fields
|
res.respond(200, savedUser.toJSON().auth.local); // We convert to toJSON to hide private fields
|
||||||
} else {
|
} else {
|
||||||
res.respond(201, savedUser);
|
let userJSON = savedUser.toJSON()
|
||||||
|
userJSON.newUser = true;
|
||||||
|
res.respond(201, userJSON);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean previous email preferences and send welcome email
|
// Clean previous email preferences and send welcome email
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue