mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 07:48:49 +01:00
🎨 Add internal kernel API /api/search/updateEmbedBlock https://github.com/siyuan-note/siyuan/issues/9736
This commit is contained in:
parent
47df3f8b3d
commit
4a8c32f649
4 changed files with 44 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue