mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-19 10:30:45 +08:00
🎨 反链面板支持文档排序 https://github.com/siyuan-note/insider/issues/1086
This commit is contained in:
parent
1715faad31
commit
8b5f2cad5a
@ -18,6 +18,7 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"github.com/88250/gulu"
|
"github.com/88250/gulu"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@ -92,12 +93,12 @@ func getBacklink2(c *gin.Context) {
|
|||||||
sortArg := arg["sort"]
|
sortArg := arg["sort"]
|
||||||
sort := util.SortModeUpdatedDESC
|
sort := util.SortModeUpdatedDESC
|
||||||
if nil != sortArg {
|
if nil != sortArg {
|
||||||
sort = int(sortArg.(float64))
|
sort, _ = strconv.Atoi(sortArg.(string))
|
||||||
}
|
}
|
||||||
mentionSortArg := arg["msort"]
|
mentionSortArg := arg["msort"]
|
||||||
mentionSort := util.SortModeUpdatedDESC
|
mentionSort := util.SortModeUpdatedDESC
|
||||||
if nil != mentionSortArg {
|
if nil != mentionSortArg {
|
||||||
sort = int(mentionSortArg.(float64))
|
mentionSort, _ = strconv.Atoi(mentionSortArg.(string))
|
||||||
}
|
}
|
||||||
boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink2(id, keyword, mentionKeyword, sort, mentionSort)
|
boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink2(id, keyword, mentionKeyword, sort, mentionSort)
|
||||||
ret.Data = map[string]interface{}{
|
ret.Data = map[string]interface{}{
|
||||||
|
Loading…
Reference in New Issue
Block a user