[优化] 工具整理

This commit is contained in:
ryan
2026-03-14 15:03:05 +08:00
parent f1476610f6
commit 605a70b428
26 changed files with 316 additions and 240 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package model
import (
"atsflare/common"
"atsflare/utils/security"
"github.com/glebarez/sqlite"
"gorm.io/driver/mysql"
"gorm.io/gorm"
@@ -26,7 +27,7 @@ func createRootAccountIfNeed() error {
//if user.Status != common.UserStatusEnabled {
if err := DB.First(&user).Error; err != nil {
slog.Info("no user exists, create a root user", "username", "root")
hashedPassword, err := common.Password2Hash("123456")
hashedPassword, err := security.Password2Hash("123456")
if err != nil {
return err
}