This commit is contained in:
Liang Ding 2022-10-14 16:46:15 +08:00
parent d15c7c5e4c
commit 2a4f533574
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 33 additions and 5 deletions

View file

@ -123,13 +123,16 @@ func insertBlock(c *gin.Context) {
data := arg["data"].(string)
dataType := arg["dataType"].(string)
var parentID, previousID string
var parentID, previousID, nextID string
if nil != arg["parentID"] {
parentID = arg["parentID"].(string)
}
if nil != arg["previousID"] {
previousID = arg["previousID"].(string)
}
if nil != arg["nextID"] {
nextID = arg["nextID"].(string)
}
if "markdown" == dataType {
luteEngine := model.NewLute()
@ -144,6 +147,7 @@ func insertBlock(c *gin.Context) {
Data: data,
ParentID: parentID,
PreviousID: previousID,
NextID: nextID,
},
},
},