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

This commit is contained in:
Daniel 2024-03-04 11:51:03 +08:00
parent a28a53315a
commit 83dca3f853
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 45 additions and 3 deletions

View file

@ -26,6 +26,26 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func setDatabaseBlockView(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
blockID := arg["id"].(string)
viewID := arg["viewID"].(string)
err := model.SetDatabaseBlockView(blockID, viewID)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
return
}
}
func getAttributeViewPrimaryKeyValues(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)