master
Evan Chen 2022-01-27 18:53:39 +08:00
parent c72c40fcd3
commit 616101038a
1 changed files with 1 additions and 0 deletions

View File

@ -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 {