mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
🎨 Add Duplicate non-mirror database block https://github.com/siyuan-note/siyuan/issues/11460
This commit is contained in:
parent
aaeda056fa
commit
f197a4ea87
3 changed files with 64 additions and 0 deletions
|
|
@ -27,6 +27,29 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func duplicateAttributeViewBlock(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
avID := arg["avID"].(string)
|
||||
|
||||
newAvID, newBlockID, err := model.DuplicateDatabaseBlock(avID)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
ret.Data = map[string]interface{}{
|
||||
"avID": newAvID,
|
||||
"blockID": newBlockID,
|
||||
}
|
||||
}
|
||||
|
||||
func getAttributeViewKeysByAvID(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue