🧑‍💻 Add kernel API /api/av/batchSetAttributeViewBlockAttrs https://github.com/siyuan-note/siyuan/issues/15310

This commit is contained in:
Daniel 2025-07-16 23:44:15 +08:00
parent 4c2c4b4a72
commit d7e2d5903a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 68 additions and 9 deletions

View file

@ -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)
}