update
parent
c72c40fcd3
commit
616101038a
|
@ -63,6 +63,7 @@ func (srv Service) SetDefaultAdmin(username, password string) error {
|
|||
pwd, _ := bcrypt.GenerateFromPassword([]byte(password), 14)
|
||||
usr.Username = username
|
||||
usr.Password = string(pwd)
|
||||
usr.Activated = true
|
||||
err = DB.Transaction(func(tx *gorm.DB) error {
|
||||
err := tx.Create(usr).Error
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue