|
@@ -51,7 +51,7 @@ func getBackmentionDoc(c *gin.Context) {
|
|
|
defID := arg["defID"].(string)
|
|
|
refTreeID := arg["refTreeID"].(string)
|
|
|
keyword := arg["keyword"].(string)
|
|
|
- containChildren := true
|
|
|
+ containChildren := false
|
|
|
if val, ok := arg["containChildren"]; ok {
|
|
|
containChildren = val.(bool)
|
|
|
}
|
|
@@ -73,7 +73,7 @@ func getBacklinkDoc(c *gin.Context) {
|
|
|
defID := arg["defID"].(string)
|
|
|
refTreeID := arg["refTreeID"].(string)
|
|
|
keyword := arg["keyword"].(string)
|
|
|
- containChildren := true
|
|
|
+ containChildren := false
|
|
|
if val, ok := arg["containChildren"]; ok {
|
|
|
containChildren = val.(bool)
|
|
|
}
|
|
@@ -109,7 +109,11 @@ func getBacklink2(c *gin.Context) {
|
|
|
if nil != mentionSortArg {
|
|
|
mentionSort, _ = strconv.Atoi(mentionSortArg.(string))
|
|
|
}
|
|
|
- boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink2(id, keyword, mentionKeyword, sort, mentionSort)
|
|
|
+ containChildren := false
|
|
|
+ if val, ok := arg["containChildren"]; ok {
|
|
|
+ containChildren = val.(bool)
|
|
|
+ }
|
|
|
+ boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink2(id, keyword, mentionKeyword, sort, mentionSort, containChildren)
|
|
|
ret.Data = map[string]interface{}{
|
|
|
"backlinks": backlinks,
|
|
|
"linkRefsCount": linkRefsCount,
|
|
@@ -141,7 +145,11 @@ func getBacklink(c *gin.Context) {
|
|
|
if nil != arg["beforeLen"] {
|
|
|
beforeLen = int(arg["beforeLen"].(float64))
|
|
|
}
|
|
|
- boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink(id, keyword, mentionKeyword, beforeLen)
|
|
|
+ containChildren := false
|
|
|
+ if val, ok := arg["containChildren"]; ok {
|
|
|
+ containChildren = val.(bool)
|
|
|
+ }
|
|
|
+ boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink(id, keyword, mentionKeyword, beforeLen, containChildren)
|
|
|
ret.Data = map[string]interface{}{
|
|
|
"backlinks": backlinks,
|
|
|
"linkRefsCount": linkRefsCount,
|