Browse Source

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

Daniel 1 year ago
parent
commit
cf5948dd1a
1 changed files with 1 additions and 0 deletions
  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
 	}