From 58ffdeb38cfe8b4517ae71fa79121818d0329cc2 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 2 Jan 2023 22:00:20 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=88=86=E4=BA=AB=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E5=88=B0=E9=93=BE=E6=BB=B4=20https://github.com/siyua?= =?UTF-8?q?n-note/siyuan/issues/2004?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/export.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/model/export.go b/kernel/model/export.go index 87432d777..e64918f2e 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