🎨 Add internal kernel API /api/search/updateEmbedBlock https://github.com/siyuan-note/siyuan/issues/9736

This commit is contained in:
Daniel 2023-11-24 17:37:34 +08:00
parent 47df3f8b3d
commit 4a8c32f649
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 44 additions and 1 deletions

View file

@ -218,6 +218,26 @@ func getEmbedBlock(c *gin.Context) {
}
}
func updateEmbedBlock(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)
content := arg["content"].(string)
err := model.UpdateEmbedBlock(id, content)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
return
}
}
func searchEmbedBlock(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)