mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 题头图支持资源文件搜索 https://github.com/siyuan-note/siyuan/issues/9524
This commit is contained in:
parent
ed117fd577
commit
eba283d8b2
2 changed files with 25 additions and 2 deletions
|
|
@ -101,7 +101,15 @@ func searchAsset(c *gin.Context) {
|
|||
}
|
||||
|
||||
k := arg["k"].(string)
|
||||
ret.Data = model.SearchAssetsByName(k)
|
||||
|
||||
var exts []string
|
||||
if extsArg := arg["exts"]; nil != extsArg {
|
||||
for _, ext := range extsArg.([]interface{}) {
|
||||
exts = append(exts, ext.(string))
|
||||
}
|
||||
}
|
||||
|
||||
ret.Data = model.SearchAssetsByName(k, exts)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue