diff --git a/kernel/model/export.go b/kernel/model/export.go index e64918f2e..c5f204a91 100644 --- a/kernel/model/export.go +++ b/kernel/model/export.go @@ -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)