mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 04:48:48 +01:00
🎨 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:
parent
fe3caaaa6b
commit
5dab0ecdf6
4 changed files with 77 additions and 15 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue