Signed-off-by: link <a624669980@163.com>
This commit is contained in:
link 2023-06-07 15:23:29 +08:00 committed by GitHub
parent f867453573
commit 6246421dae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -378,7 +378,7 @@ func GetSystemEntry(c *gin.Context) {
entry := service.MyService.System().GetSystemEntry() entry := service.MyService.System().GetSystemEntry()
str := json.RawMessage(entry) str := json.RawMessage(entry)
if !gjson.ValidBytes(str) { 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 return
} }
c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: str}) c.JSON(http.StatusOK, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: str})