An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Kernel API `/api/file/*` no longer use HTTP status code https://github.com/siyuan-note/siyuan/issues/8329
Daniel7b0cfbe0b4e6
diff --git a/kernel/api/file.go b/kernel/api/file.goindex eb0d0e8345..8b8348a758 100644--- a/kernel/api/file.go+++ b/kernel/api/file.go@@ -93,18 +93,21 @@ func getFile(c *gin.Context) {info, err := os.Stat(filePath)if os.IsNotExist(err) {ret.Code = 404+ c.JSON(http.StatusOK, ret)return}if nil != err {logging.LogErrorf("stat [%s] failed: %s", filePath, err)ret.Code = 500ret.Msg = err.Error()+ c.JSON(http.StatusOK, ret)return}if info.IsDir() {logging.LogErrorf("file [%s] is a directory", filePath)ret.Code = 405ret.Msg = "file is a directory"+ c.JSON(http.StatusOK, ret)return}@@ -113,6 +116,7 @@ func getFile(c *gin.Context) {logging.LogErrorf("read file [%s] failed: %s", filePath, err)ret.Code = 500ret.Msg = err.Error()+ c.JSON(http.StatusOK, ret)return}