This commit is contained in:
Daniel 2023-08-12 22:48:46 +08:00
parent b753630c20
commit e66676598f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 45 additions and 0 deletions

View file

@ -26,6 +26,25 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func getAssetContent(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
id := arg["id"].(string)
query := arg["query"].(string)
queryMethod := int(arg["queryMethod"].(float64))
ret.Data = map[string]interface{}{
"assetContent": model.GetAssetContent(id, query, queryMethod),
}
return
}
func fullTextSearchAssetContent(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)