🎨 When deleting a referenced definition block, a pop-up window will prompt the user https://github.com/siyuan-note/siyuan/issues/13396

This commit is contained in:
Daniel 2025-03-16 20:04:08 +08:00
parent fe3caaaa6b
commit 5dab0ecdf6
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 77 additions and 15 deletions

View file

@ -31,6 +31,25 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func checkBlockRef(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
idsArg := arg["ids"].([]interface{})
var ids []string
for _, id := range idsArg {
ids = append(ids, id.(string))
}
ids = gulu.Str.RemoveDuplicatedElem(ids)
ret.Data = model.CheckBlockRef(ids)
}
func getBlockTreeInfos(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)