Skip to content

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

:sparkles: 分享文档到链滴 https://github.com/siyuan-note/siyuan/issues/2004

Liang Ding58ffdeb38cfe
diff --git a/kernel/model/export.go b/kernel/model/export.go
index 87432d7779..e64918f2ea 100644
--- a/kernel/model/export.go
+++ b/kernel/model/export.go
@@ -65,10 +65,8 @@ func Export2Liandi(id string) (err error) {
foundArticle := false
articleId := tree.Root.IALAttr("liandiArticleId")
if "" != articleId {
- var result = map[string]interface{}{}
request := httpclient.NewCloudRequest30s()
resp, getErr := request.
- SetResult(result).
SetCookies(&http.Cookie{Name: "symphony", Value: Conf.User.UserToken}).
Get(util.LiandiServer + "/api/v2/article/update/" + articleId)
if nil != getErr {
@@ -96,7 +94,7 @@ func Export2Liandi(id string) (err error) {
title := path.Base(tree.HPath)
tags := tree.Root.IALAttr("tags")
content := exportMarkdownContent0(tree)
- var result = map[string]interface{}{}
+ var result = gulu.Ret.NewResult()
request := httpclient.NewCloudRequest30s()
request = request.
SetResult(result).
@@ -123,7 +121,7 @@ func Export2Liandi(id string) (err error) {
}
if !foundArticle {
- articleId = result["data"].(string)
+ articleId = result.Data.(string)
tree.Root.SetIALAttr("liandiArticleId", articleId)
if err = writeJSONQueue(tree); nil != err {
return