Browse Source

fixed: 修复jwt的signing-key 未转成string导致乱码的问题

main
SliverHorn 3 years ago
parent
commit
5934a2ba00
  1. 2
      server/service/system/sys_initdb_mysql.go
  2. 2
      server/service/system/sys_initdb_pgsql.go

2
server/service/system/sys_initdb_mysql.go

@ -24,7 +24,7 @@ func (initDBService *InitDBService) writeMysqlConfig(mysql config.Mysql) error {
for k, v := range cs { for k, v := range cs {
global.GVA_VP.Set(k, v) global.GVA_VP.Set(k, v)
} }
global.GVA_VP.Set("jwt.signing-key", uuid.NewV4())
global.GVA_VP.Set("jwt.signing-key", uuid.NewV4().String())
return global.GVA_VP.WriteConfig() return global.GVA_VP.WriteConfig()
} }

2
server/service/system/sys_initdb_pgsql.go

@ -23,7 +23,7 @@ func (initDBService *InitDBService) writePgsqlConfig(pgsql config.Pgsql) error {
for k, v := range cs { for k, v := range cs {
global.GVA_VP.Set(k, v) global.GVA_VP.Set(k, v)
} }
global.GVA_VP.Set("jwt.signing-key", uuid.NewV4())
global.GVA_VP.Set("jwt.signing-key", uuid.NewV4().String())
return global.GVA_VP.WriteConfig() return global.GVA_VP.WriteConfig()
} }

Loading…
Cancel
Save