浏览代码

Up json (#1173)

Signed-off-by: link <a624669980@163.com>
link 2 年之前
父节点
当前提交
6246421dae
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      route/v1/system.go

+ 1 - 1
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})