From 27434f323576b30d37a70bd205ef33611b45f310 Mon Sep 17 00:00:00 2001 From: Vyacheslav Scherbinin Date: Mon, 30 Sep 2024 22:06:38 +0700 Subject: Fix toasts (#2571) * Add space to toast status messages * Removed opening space from translations --- web/controller/util.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/controller') 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) } -- cgit v1.2.3