Allow empty email

This commit is contained in:
Lakhan Samani
2023-10-26 00:55:10 +05:30
parent 4bddbde280
commit 9a6f1a659a
25 changed files with 65 additions and 56 deletions

View File

@@ -136,7 +136,7 @@ func (p *provider) GetUserByID(ctx context.Context, id string) (*models.User, er
var user *models.User
err := collection.Get("id", id).OneWithContext(ctx, &user)
if err != nil {
if user.Email == "" {
if refs.StringValue(user.Email) == "" {
return user, errors.New("no documets found")
} else {
return user, nil