Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 反链面板支持文档排序 https://github.com/siyuan-note/insider/issues/1086

Liang Ding8b5f2cad5a8a
diff --git a/kernel/api/ref.go b/kernel/api/ref.go
index a33ad83d0a..78ca99b573 100644
--- a/kernel/api/ref.go
+++ b/kernel/api/ref.go
@@ -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{}{