zwxi 10 months ago
parent
commit
bf431a9392
1 changed files with 1 additions and 1 deletions
  1. 1 1
      controllers/base_auth.go

+ 1 - 1
controllers/base_auth.go

@@ -283,7 +283,7 @@ func (c *BaseAuthController) ServeJSON(encoding ...bool) {
 
 	if c.Lang == utils.EnLangVersion {
 		msg := c.Data["json"].(*models.BaseResponse).Msg
-		if utils.ViperConfig.GetBool(msg) {
+		if utils.ViperConfig.InConfig(msg) {
 			c.Data["json"].(*models.BaseResponse).Msg = utils.ViperConfig.GetString(msg)
 		}
 	}