Skip to content

Commit

Permalink
🏷️ 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skye-z committed May 11, 2024
1 parent 6edcc77 commit 3741c27
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion page
Submodule page updated from d13b2d to f1e534
2 changes: 1 addition & 1 deletion service/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (ss SettingService) UpdateSecureSetting(ctx *gin.Context) {
return
}

var blacklist map[string]interface{}
var blacklist = make(map[string]interface{})
err := json.Unmarshal([]byte(form.BlackList), &blacklist)
if err != nil {
util.ReturnMessage(ctx, false, "传入数据非法")
Expand Down
5 changes: 4 additions & 1 deletion util/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ func InitConfig() {

func Set(key string, value interface{}) {
viper.Set(key, value)
viper.WriteConfig()
err := viper.WriteConfig()
if err != nil {
log.Println("[Config] save error,", err.Error())
}
}

func GetBool(key string) bool {
Expand Down

0 comments on commit 3741c27

Please sign in to comment.