mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-26 19:38:48 +01:00
🧑💻 Add kernel API /api/av/batchSetAttributeViewBlockAttrs https://github.com/siyuan-note/siyuan/issues/15310
This commit is contained in:
parent
4c2c4b4a72
commit
d7e2d5903a
3 changed files with 68 additions and 9 deletions
|
|
@ -735,3 +735,24 @@ func setAttributeViewBlockAttr(c *gin.Context) {
|
|||
|
||||
model.ReloadAttrView(avID)
|
||||
}
|
||||
|
||||
func batchSetAttributeViewBlockAttrs(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
avID := arg["avID"].(string)
|
||||
values := arg["values"].([]interface{})
|
||||
err := model.BatchUpdateAttributeViewCells(nil, avID, values)
|
||||
if err != nil {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
model.ReloadAttrView(avID)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue