fix: make email verification col nullable

This commit is contained in:
Lakhan Samani
2021-12-22 15:38:51 +05:30
parent 3ee79c3937
commit 969395ccdb
9 changed files with 16 additions and 12 deletions

View File

@@ -206,7 +206,8 @@ func OAuthCallbackHandler() gin.HandlerFunc {
}
user.Roles = strings.Join(inputRoles, ",")
user.EmailVerifiedAt = time.Now().Unix()
now := time.Now().Unix()
user.EmailVerifiedAt = &now
user, _ = db.Mgr.AddUser(user)
} else {
// user exists in db, check if method was google