mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 08:30:42 +02:00
🐛 分享到链滴后删除帖子问题 https://ld246.com/article/1673270084598
This commit is contained in:
parent
5cf817c3a2
commit
42e465978e
1 changed files with 8 additions and 2 deletions
|
@ -72,8 +72,10 @@ func Export2Liandi(id string) (err error) {
|
||||||
foundArticle := false
|
foundArticle := false
|
||||||
articleId := tree.Root.IALAttr(liandiArticleIdAttrName)
|
articleId := tree.Root.IALAttr(liandiArticleIdAttrName)
|
||||||
if "" != articleId {
|
if "" != articleId {
|
||||||
|
result := gulu.Ret.NewResult()
|
||||||
request := httpclient.NewCloudRequest30s()
|
request := httpclient.NewCloudRequest30s()
|
||||||
resp, getErr := request.
|
resp, getErr := request.
|
||||||
|
SetResult(result).
|
||||||
SetCookies(&http.Cookie{Name: "symphony", Value: Conf.User.UserToken}).
|
SetCookies(&http.Cookie{Name: "symphony", Value: Conf.User.UserToken}).
|
||||||
Get(util.LiandiServer + "/api/v2/article/update/" + articleId)
|
Get(util.LiandiServer + "/api/v2/article/update/" + articleId)
|
||||||
if nil != getErr {
|
if nil != getErr {
|
||||||
|
@ -83,7 +85,11 @@ func Export2Liandi(id string) (err error) {
|
||||||
|
|
||||||
switch resp.StatusCode {
|
switch resp.StatusCode {
|
||||||
case 200:
|
case 200:
|
||||||
foundArticle = true
|
if 0 == result.Code {
|
||||||
|
foundArticle = true
|
||||||
|
} else if 1 == result.Code {
|
||||||
|
foundArticle = false
|
||||||
|
}
|
||||||
case 404:
|
case 404:
|
||||||
foundArticle = false
|
foundArticle = false
|
||||||
default:
|
default:
|
||||||
|
@ -105,7 +111,7 @@ func Export2Liandi(id string) (err error) {
|
||||||
"#", "#",
|
"#", "#",
|
||||||
"", "",
|
"", "",
|
||||||
false)
|
false)
|
||||||
var result = gulu.Ret.NewResult()
|
result := gulu.Ret.NewResult()
|
||||||
request := httpclient.NewCloudRequest30s()
|
request := httpclient.NewCloudRequest30s()
|
||||||
request = request.
|
request = request.
|
||||||
SetResult(result).
|
SetResult(result).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue