From 6246421dae076ae70ff79cea186bf5e89a65b2fa Mon Sep 17 00:00:00 2001 From: link Date: Wed, 7 Jun 2023 15:23:29 +0800 Subject: [PATCH] Up json (#1173) Signed-off-by: link --- route/v1/system.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route/v1/system.go b/route/v1/system.go index 9c6c81e..fa43062 100644 --- a/route/v1/system.go +++ b/route/v1/system.go @@ -378,7 +378,7 @@ func GetSystemEntry(c *gin.Context) { entry := service.MyService.System().GetSystemEntry() str := json.RawMessage(entry) if !gjson.ValidBytes(str) { - c.JSON(http.StatusInternalServerError, model.Result{Success: common_err.SERVICE_ERROR, Message: entry, Data: "[]"}) + c.JSON(http.StatusInternalServerError, model.Result{Success: common_err.SERVICE_ERROR, Message: entry, Data: json.RawMessage("[]")}) return } c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: str})