This commit is contained in:
Liang Ding 2022-10-05 12:36:50 +08:00
parent 1715faad31
commit 8b5f2cad5a
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D

View File

@ -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{}{