diff --git a/web/controller/util.go b/web/controller/util.go index b07aaf0e..440de276 100644 --- a/web/controller/util.go +++ b/web/controller/util.go @@ -42,12 +42,12 @@ func jsonMsgObj(c *gin.Context, msg string, obj interface{}, err error) { if err == nil { m.Success = true if msg != "" { - m.Msg = msg + I18nWeb(c, "success") + m.Msg = msg + " " + I18nWeb(c, "success") } } else { m.Success = false - m.Msg = msg + I18nWeb(c, "fail") + ": " + err.Error() - logger.Warning(msg+I18nWeb(c, "fail")+": ", err) + m.Msg = msg + " " + I18nWeb(c, "fail") + ": " + err.Error() + logger.Warning(msg+" "+I18nWeb(c, "fail")+": ", err) } c.JSON(http.StatusOK, m) }