mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🎨 Kernel API transferBlockRef https://github.com/siyuan-note/siyuan/issues/8522
This commit is contained in:
parent
4153d22acb
commit
eda8da1bbe
4 changed files with 67 additions and 3 deletions
|
|
@ -47,7 +47,14 @@ func transferBlockRef(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
err := model.TransferBlockRef(fromID, toID)
|
||||
var refIDs []string
|
||||
if nil != arg["refIDs"] {
|
||||
for _, refID := range arg["refIDs"].([]interface{}) {
|
||||
refIDs = append(refIDs, refID.(string))
|
||||
}
|
||||
}
|
||||
|
||||
err := model.TransferBlockRef(fromID, toID, refIDs)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue