File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import (
10
10
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
11
11
"github.com/flipped-aurora/gin-vue-admin/server/source/example"
12
12
"github.com/flipped-aurora/gin-vue-admin/server/source/system"
13
- "github.com/flipped-aurora/gin-vue-admin/server/utils"
14
13
uuid "github.com/satori/go.uuid"
15
14
"gorm.io/driver/mysql"
16
15
"gorm.io/gorm"
@@ -21,10 +20,7 @@ import (
21
20
// Author [songzhibin97](https://github.com/songzhibin97)
22
21
func (initDBService * InitDBService ) writeMysqlConfig (mysql config.Mysql ) error {
23
22
global .GVA_CONFIG .Mysql = mysql
24
- cs := utils .StructToMap (global .GVA_CONFIG )
25
- for k , v := range cs {
26
- global .GVA_VP .Set (k , v )
27
- }
23
+ global .GVA_VP .Set ("mysql" , mysql )
28
24
global .GVA_VP .Set ("jwt.signing-key" , uuid .NewV4 ().String ())
29
25
return global .GVA_VP .WriteConfig ()
30
26
}
Original file line number Diff line number Diff line change 9
9
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
10
10
"github.com/flipped-aurora/gin-vue-admin/server/source/example"
11
11
"github.com/flipped-aurora/gin-vue-admin/server/source/system"
12
- "github.com/flipped-aurora/gin-vue-admin/server/utils"
13
12
uuid "github.com/satori/go.uuid"
14
13
"gorm.io/driver/postgres"
15
14
"gorm.io/gorm"
@@ -20,10 +19,7 @@ import (
20
19
func (initDBService * InitDBService ) writePgsqlConfig (pgsql config.Pgsql ) error {
21
20
global .GVA_CONFIG .System .DbType = "pgsql"
22
21
global .GVA_CONFIG .Pgsql = pgsql
23
- cs := utils .StructToMap (global .GVA_CONFIG )
24
- for k , v := range cs {
25
- global .GVA_VP .Set (k , v )
26
- }
22
+ global .GVA_VP .Set ("pgsql" , pgsql )
27
23
global .GVA_VP .Set ("jwt.signing-key" , uuid .NewV4 ().String ())
28
24
return global .GVA_VP .WriteConfig ()
29
25
}
You can’t perform that action at this time.
0 commit comments