🎨 Rows non-bound in the database support Add to Database https://github.com/siyuan-note/siyuan/issues/11093

This commit is contained in:
Daniel 2024-04-20 12:07:17 +08:00
parent 4cc2d9a6a8
commit 0f06692da4
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 33 additions and 27 deletions

View file

@ -127,12 +127,15 @@ func addAttributeViewValues(c *gin.Context) {
if nil != arg["ignoreFillFilter"] {
ignoreFillFilter = arg["ignoreFillFilter"].(bool)
}
var content string
if nil != arg["content"] {
content = arg["content"].(string)
}
err := model.AddAttributeViewBlock(nil, srcIDs, avID, blockID, previousID, content, isDetached, ignoreFillFilter)
var srcs []map[string]interface{}
for _, srcID := range srcIDs {
src := map[string]interface{}{
"id": srcID,
}
srcs = append(srcs, src)
}
err := model.AddAttributeViewBlock(nil, srcs, avID, blockID, previousID, isDetached, ignoreFillFilter)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()