mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 13:28:48 +01:00
🎨 Add to Database search on database title only https://github.com/siyuan-note/siyuan/issues/10934
This commit is contained in:
parent
92576d3227
commit
149fb4ebaa
4 changed files with 94 additions and 36 deletions
|
|
@ -318,22 +318,9 @@ func searchAttributeView(c *gin.Context) {
|
|||
}
|
||||
|
||||
keyword := arg["keyword"].(string)
|
||||
page := 1
|
||||
pageArg := arg["page"]
|
||||
if nil != pageArg {
|
||||
page = int(pageArg.(float64))
|
||||
}
|
||||
|
||||
pageSize := 10
|
||||
pageSizeArg := arg["pageSize"]
|
||||
if nil != pageSizeArg {
|
||||
pageSize = int(pageSizeArg.(float64))
|
||||
}
|
||||
|
||||
results, total := model.SearchAttributeView(keyword, page, pageSize)
|
||||
results := model.SearchAttributeView(keyword)
|
||||
ret.Data = map[string]interface{}{
|
||||
"results": results,
|
||||
"total": total,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue