mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Database block support specified view https://github.com/siyuan-note/siyuan/issues/10443
This commit is contained in:
parent
d519732c79
commit
e3d282ac90
5 changed files with 102 additions and 46 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue