This commit is contained in:
2019-07-17 03:21:49 -04:00
parent d5b34dc81f
commit 77f836842b
10 changed files with 145 additions and 4 deletions

View File

@@ -244,6 +244,7 @@ UserSchema.methods.toAuthJSON = function () {
email: this.email,
token: this.generateJWT(),
user: {
id: this._id,
nomDeBid: nomDeBid,
email: this.email,
firstName: this.firstName,
@@ -266,6 +267,11 @@ UserSchema.methods.toProfileJSON = function () {
email: this.email,
firstName: this.firstName,
generatedNomDeBid: !hasNomDeBid,
hasLinkedApple: !!this.getAuthStrategy('apple'),
hasLinkedFacebook: !!this.getAuthStrategy('facebook'),
hasLinkedGoogle: !!this.getAuthStrategy('google'),
hasLocalAccount: !!this.getAuthStrategy('local'),
_id: this.id,
isAllowedToBid: this.isAllowedToBid,
isOrganizationEmployee: this.isOrganizationEmployee,
isVerified: this.isVerified,