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
|
||||
articleId := tree.Root.IALAttr(liandiArticleIdAttrName)
|
||||
if "" != articleId {
|
||||
result := gulu.Ret.NewResult()
|
||||
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 {
|
||||
|
@ -83,7 +85,11 @@ func Export2Liandi(id string) (err error) {
|
|||
|
||||
switch resp.StatusCode {
|
||||
case 200:
|
||||
if 0 == result.Code {
|
||||
foundArticle = true
|
||||
} else if 1 == result.Code {
|
||||
foundArticle = false
|
||||
}
|
||||
case 404:
|
||||
foundArticle = false
|
||||
default:
|
||||
|
@ -105,7 +111,7 @@ func Export2Liandi(id string) (err error) {
|
|||
"#", "#",
|
||||
"", "",
|
||||
false)
|
||||
var result = gulu.Ret.NewResult()
|
||||
result := gulu.Ret.NewResult()
|
||||
request := httpclient.NewCloudRequest30s()
|
||||
request = request.
|
||||
SetResult(result).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue