User delete feature

This commit is contained in:
NGPixel
2017-02-10 13:13:40 -05:00
parent 1fe7b68144
commit c6853a0315
9 changed files with 51 additions and 14 deletions

View File

@@ -63,10 +63,9 @@ userSchema.statics.processProfile = (profile) => {
providerId: profile.id,
name: profile.displayName || _.split(primaryEmail, '@')[0]
}, {
new: true,
upsert: true
new: true
}).then((user) => {
return user || Promise.reject(new Error('User Upsert failed.'))
return user || Promise.reject(new Error('You have not been authorized to login to this site yet.'))
})
}