Commit b9340faf authored by hujiebin's avatar hujiebin

cc

parent b384dfb3
...@@ -509,7 +509,7 @@ func selfCheck() { ...@@ -509,7 +509,7 @@ func selfCheck() {
} }
} }
type HiloConfig struct { type HiloConfigs struct {
Name string `gorm:"primary_key"` Name string `gorm:"primary_key"`
Value string Value string
} }
...@@ -559,7 +559,7 @@ func main() { ...@@ -559,7 +559,7 @@ func main() {
mylogrus.MyLog.Infof("mysql connect success") mylogrus.MyLog.Infof("mysql connect success")
} }
var jwtConfig = HiloConfig{} var jwtConfig = HiloConfigs{}
db.First(&jwtConfig, "name = 'jwt_secret'") db.First(&jwtConfig, "name = 'jwt_secret'")
if len(jwtConfig.Value) == 0 { if len(jwtConfig.Value) == 0 {
mylogrus.MyLog.Fatalln("Empty jwt secret") mylogrus.MyLog.Fatalln("Empty jwt secret")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment