This commit is contained in:
Liang Ding 2023-01-02 22:02:23 +08:00
parent 58ffdeb38c
commit 8707f07d8a
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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)