Fix go mod (#1421)
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"github.com/gofrs/uuid"
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -32,7 +32,7 @@ func (h MysqlInitHandler) WriteConfig(ctx context.Context) error {
|
||||
}
|
||||
global.GVA_CONFIG.System.DbType = "mysql"
|
||||
global.GVA_CONFIG.Mysql = c
|
||||
global.GVA_CONFIG.JWT.SigningKey = uuid.NewV4().String()
|
||||
global.GVA_CONFIG.JWT.SigningKey = uuid.Must(uuid.NewV4()).String()
|
||||
cs := utils.StructToMap(global.GVA_CONFIG)
|
||||
for k, v := range cs {
|
||||
global.GVA_VP.Set(k, v)
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"github.com/gofrs/uuid"
|
||||
"gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -32,7 +32,7 @@ func (h PgsqlInitHandler) WriteConfig(ctx context.Context) error {
|
||||
}
|
||||
global.GVA_CONFIG.System.DbType = "pgsql"
|
||||
global.GVA_CONFIG.Pgsql = c
|
||||
global.GVA_CONFIG.JWT.SigningKey = uuid.NewV4().String()
|
||||
global.GVA_CONFIG.JWT.SigningKey = uuid.Must(uuid.NewV4()).String()
|
||||
cs := utils.StructToMap(global.GVA_CONFIG)
|
||||
for k, v := range cs {
|
||||
global.GVA_VP.Set(k, v)
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/utils"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"github.com/gofrs/uuid"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ func (userService *UserService) Register(u system.SysUser) (userInter system.Sys
|
||||
}
|
||||
// 否则 附加uuid 密码hash加密 注册
|
||||
u.Password = utils.BcryptHash(u.Password)
|
||||
u.UUID = uuid.NewV4()
|
||||
u.UUID = uuid.Must(uuid.NewV4())
|
||||
err = global.GVA_DB.Create(&u).Error
|
||||
return u, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user