diff options
Diffstat (limited to 'web/controller/util.go')
| -rw-r--r-- | web/controller/util.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/controller/util.go b/web/controller/util.go index 40c7a8e9..a77d0e35 100644 --- a/web/controller/util.go +++ b/web/controller/util.go @@ -42,11 +42,11 @@ func jsonMsgObj(c *gin.Context, msg string, obj any, err error) { if err == nil { m.Success = true if msg != "" { - m.Msg = msg + " " + I18nWeb(c, "success") + m.Msg = msg } } else { m.Success = false - m.Msg = msg + " " + I18nWeb(c, "fail") + ": " + err.Error() + m.Msg = msg + " (" + err.Error() + ")" logger.Warning(msg+" "+I18nWeb(c, "fail")+": ", err) } c.JSON(http.StatusOK, m) |
