mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-19 02:21:38 +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 (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/gin-gonic/gin"
|
||||
@ -92,12 +93,12 @@ func getBacklink2(c *gin.Context) {
|
||||
sortArg := arg["sort"]
|
||||
sort := util.SortModeUpdatedDESC
|
||||
if nil != sortArg {
|
||||
sort = int(sortArg.(float64))
|
||||
sort, _ = strconv.Atoi(sortArg.(string))
|
||||
}
|
||||
mentionSortArg := arg["msort"]
|
||||
mentionSort := util.SortModeUpdatedDESC
|
||||
if nil != mentionSortArg {
|
||||
sort = int(mentionSortArg.(float64))
|
||||
mentionSort, _ = strconv.Atoi(mentionSortArg.(string))
|
||||
}
|
||||
boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink2(id, keyword, mentionKeyword, sort, mentionSort)
|
||||
ret.Data = map[string]interface{}{
|
||||
|
Loading…
Reference in New Issue
Block a user