add default for userCreation
This commit is contained in:
@@ -70,6 +70,8 @@ func (service *UserService) RegisterUser(user *models.User) (uint, string, error
|
|||||||
user.Status = constants.UnverifiedStatus
|
user.Status = constants.UnverifiedStatus
|
||||||
user.CreatedAt = time.Now()
|
user.CreatedAt = time.Now()
|
||||||
user.UpdatedAt = time.Now()
|
user.UpdatedAt = time.Now()
|
||||||
|
user.PaymentStatus = constants.AwaitingPaymentStatus
|
||||||
|
user.BankAccount.MandateDateSigned = time.Now()
|
||||||
id, err := service.Repo.CreateUser(user)
|
id, err := service.Repo.CreateUser(user)
|
||||||
|
|
||||||
if err != nil && strings.Contains(err.Error(), "UNIQUE constraint failed") {
|
if err != nil && strings.Contains(err.Error(), "UNIQUE constraint failed") {
|
||||||
|
|||||||
Reference in New Issue
Block a user