diff options
| author | Shishkevich D. <135337715+shishkevichd@users.noreply.github.com> | 2025-05-09 06:46:29 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-09 06:46:29 +0300 |
| commit | 1ddfe4aba3ff16df9e5006051407d2488ffe4a59 (patch) | |
| tree | 28eb61df88797217558fd168e3a3bac7b49dc7b6 /web/controller/util.go | |
| parent | fe3b1c9b52f584b0f045907585b206344fed55db (diff) | |
chore: toasts translation refactoring
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) |
