mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-01 14:28:49 +01:00
This commit is contained in:
parent
58ffdeb38c
commit
8707f07d8a
1 changed files with 9 additions and 3 deletions
|
|
@ -100,9 +100,9 @@ func Export2Liandi(id string) (err error) {
|
|||
SetResult(result).
|
||||
SetCookies(&http.Cookie{Name: "symphony", Value: Conf.User.UserToken}).
|
||||
SetBody(map[string]interface{}{
|
||||
"title": title,
|
||||
"tags": tags,
|
||||
"content": content})
|
||||
"articleTitle": title,
|
||||
"articleTags": tags,
|
||||
"articleContent": content})
|
||||
var resp *req.Response
|
||||
var sendErr error
|
||||
if foundArticle {
|
||||
|
|
@ -120,6 +120,12 @@ func Export2Liandi(id string) (err error) {
|
|||
return errors.New(msg)
|
||||
}
|
||||
|
||||
if 0 != result.Code {
|
||||
msg := fmt.Sprintf("send article to liandi failed [code=%d, msg=%s]", result.Code, result.Msg)
|
||||
logging.LogErrorf(msg)
|
||||
return errors.New(msg)
|
||||
}
|
||||
|
||||
if !foundArticle {
|
||||
articleId = result.Data.(string)
|
||||
tree.Root.SetIALAttr("liandiArticleId", articleId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue