From 39939d8a6fa8b9b2420ade8da485a9e6e8a9da32 Mon Sep 17 00:00:00 2001 From: Vyacheslav Scherbinin Date: Mon, 30 Sep 2024 18:31:20 +0700 Subject: [PATCH] Add space to toast status messages --- web/controller/util.go | 6 +++--- 1 file 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) }