🎨 Database block support specified view https://github.com/siyuan-note/siyuan/issues/10443

This commit is contained in:
Daniel 2024-03-04 16:41:41 +08:00
parent d519732c79
commit e3d282ac90
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 102 additions and 46 deletions

View file

@ -91,9 +91,9 @@ func addAttributeViewValues(c *gin.Context) {
}
avID := arg["avID"].(string)
viewID := ""
if viewIDArg := arg["viewID"]; nil != viewIDArg {
viewID = viewIDArg.(string)
blockID := ""
if blockIDArg := arg["blockID"]; nil != blockIDArg {
blockID = blockIDArg.(string)
}
var srcIDs []string
for _, v := range arg["srcIDs"].([]interface{}) {
@ -105,7 +105,7 @@ func addAttributeViewValues(c *gin.Context) {
}
isDetached := arg["isDetached"].(bool)
err := model.AddAttributeViewBlock(nil, srcIDs, avID, viewID, previousID, isDetached)
err := model.AddAttributeViewBlock(nil, srcIDs, avID, blockID, previousID, isDetached)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()

View file

@ -43,8 +43,8 @@ func exportAttributeView(c *gin.Context) {
}
avID := arg["id"].(string)
viewID := arg["viewID"].(string)
zipPath, err := model.ExportAv2CSV(avID, viewID)
blockID := arg["blockID"].(string)
zipPath, err := model.ExportAv2CSV(avID, blockID)
if nil != err {
ret.Code = 1
ret.Msg = err.Error()