mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-06 10:09:58 +08:00
This commit is contained in:
parent
987f55fdb8
commit
c4a4523cdf
@ -73,7 +73,6 @@ func getBacklinkDoc(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func getBacklink2(c *gin.Context) {
|
func getBacklink2(c *gin.Context) {
|
||||||
ret := gulu.Ret.NewResult()
|
ret := gulu.Ret.NewResult()
|
||||||
defer c.JSON(http.StatusOK, ret)
|
defer c.JSON(http.StatusOK, ret)
|
||||||
@ -118,8 +117,11 @@ func getBacklink(c *gin.Context) {
|
|||||||
id := arg["id"].(string)
|
id := arg["id"].(string)
|
||||||
keyword := arg["k"].(string)
|
keyword := arg["k"].(string)
|
||||||
mentionKeyword := arg["mk"].(string)
|
mentionKeyword := arg["mk"].(string)
|
||||||
beforeLen := arg["beforeLen"].(float64)
|
beforeLen := 12
|
||||||
boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink(id, keyword, mentionKeyword, int(beforeLen))
|
if nil != arg["beforeLen"] {
|
||||||
|
beforeLen = int(arg["beforeLen"].(float64))
|
||||||
|
}
|
||||||
|
boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink(id, keyword, mentionKeyword, beforeLen)
|
||||||
ret.Data = map[string]interface{}{
|
ret.Data = map[string]interface{}{
|
||||||
"backlinks": backlinks,
|
"backlinks": backlinks,
|
||||||
"linkRefsCount": linkRefsCount,
|
"linkRefsCount": linkRefsCount,
|
||||||
|
Loading…
Reference in New Issue
Block a user