diff options
| author | Vyacheslav Scherbinin <gentslava@mail.ru> | 2024-09-30 18:06:38 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-30 18:06:38 +0300 |
| commit | 27434f323576b30d37a70bd205ef33611b45f310 (patch) | |
| tree | ea0102f7c4581e79d8eb218cee6e7ac56a6bf487 /web/controller | |
| parent | cdb6eac0e67b344b1c8edb5dc290395fedddb829 (diff) | |
Fix toasts (#2571)
* Add space to toast status messages
* Removed opening space from translations
Diffstat (limited to 'web/controller')
| -rw-r--r-- | web/controller/util.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) } |
