Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 持久化 localStorage https://github.com/siyuan-note/siyuan/issues/6404

Liang Ding33fa1700f8e0
diff --git a/kernel/api/system.go b/kernel/api/system.go
index 4581474e59..60abdb9bfc 100644
--- a/kernel/api/system.go
+++ b/kernel/api/system.go
@@ -168,13 +168,6 @@ func getLocalStorage(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
- arg, ok := util.JsonArg(c, ret)
- if !ok {
- return
- }
-
- key := arg["key"].(string)
-
lsPath := filepath.Join(util.DataDir, "storage/local.json")
if !gulu.File.IsExist(lsPath) {
return
@@ -194,8 +187,7 @@ func getLocalStorage(c *gin.Context) {
return
}
- value := ls[key]
- ret.Data = value
+ ret.Data = ls
}
func setLocalStorage(c *gin.Context) {