switched to gorm..

This commit is contained in:
$(pass /github/name)
2024-07-10 14:22:56 +02:00
parent 87e9f71ceb
commit 6ac5491053
27 changed files with 368 additions and 283 deletions

View File

@@ -1,6 +1,7 @@
package services
import (
"GoMembership/internal/constants"
"GoMembership/internal/models"
"GoMembership/internal/repositories"
"GoMembership/internal/utils"
@@ -38,7 +39,7 @@ func (service *userService) RegisterUser(user *models.User) (int64, string, erro
return -1, err
}
user.Password = string(hashedPassword) */
user.Status = "unverified"
user.Status = constants.UnverifiedStatus
user.CreatedAt = time.Now()
user.UpdatedAt = time.Now()
id, err := service.repo.CreateUser(user)