浏览代码

:art: Improve the response status code of kernel API `/api/file/getFile` https://github.com/siyuan-note/siyuan/pull/9075

Daniel 1 年之前
父节点
当前提交
cf5948dd1a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      kernel/api/file.go

+ 1 - 0
kernel/api/file.go

@@ -84,6 +84,7 @@ func getFile(c *gin.Context) {
 	ret := gulu.Ret.NewResult()
 	arg, ok := util.JsonArg(c, ret)
 	if !ok {
+		ret.Code = -1
 		c.JSON(http.StatusAccepted, ret)
 		return
 	}