From b412df70f1b2e9f10b75e095a2329f10b48e01b5 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sat, 18 Feb 2023 16:07:32 +0330 Subject: update pack 2 --- web/controller/util.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/controller/util.go') diff --git a/web/controller/util.go b/web/controller/util.go index 2bd2fa55..20ae1ea4 100644 --- a/web/controller/util.go +++ b/web/controller/util.go @@ -46,12 +46,12 @@ func jsonMsgObj(c *gin.Context, msg string, obj interface{}, err error) { if err == nil { m.Success = true if msg != "" { - m.Msg = msg + I18n(c , "success") + m.Msg = msg + I18n(c, "success") } } else { m.Success = false - m.Msg = msg + I18n(c , "fail") + ": " + err.Error() - logger.Warning(msg + I18n(c , "fail") + ": ", err) + m.Msg = msg + I18n(c, "fail") + ": " + err.Error() + logger.Warning(msg+I18n(c, "fail")+": ", err) } c.JSON(http.StatusOK, m) } -- cgit v1.2.3