mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-02 13:41:48 +01:00
🎨 Update av
This commit is contained in:
parent
986a229fe2
commit
85d876e667
3 changed files with 33 additions and 8 deletions
|
|
@ -77,3 +77,21 @@ func getAttributeViewKeys(c *gin.Context) {
|
|||
blockAttributeViewKeys := model.GetBlockAttributeViewKeys(id)
|
||||
ret.Data = blockAttributeViewKeys
|
||||
}
|
||||
|
||||
func setAttributeViewBlockAttrs(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)
|
||||
keyID := arg["keyID"].(string)
|
||||
rowID := arg["rowID"].(string)
|
||||
cellID := arg["cellID"].(string)
|
||||
value := arg["value"].(interface{})
|
||||
blockAttributeViewKeys := model.UpdateAttributeViewCell(avID, keyID, rowID, cellID, value)
|
||||
ret.Data = blockAttributeViewKeys
|
||||
}
|
||||
|
|
|
|||
|
|
@ -360,6 +360,7 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
|
||||
ginServer.Handle("POST", "/api/av/renderAttributeView", model.CheckAuth, renderAttributeView)
|
||||
ginServer.Handle("POST", "/api/av/getAttributeViewKeys", model.CheckAuth, getAttributeViewKeys)
|
||||
ginServer.Handle("POST", "/api/av/setAttributeViewBlockAttrs", model.CheckAuth, setAttributeViewBlockAttrs)
|
||||
|
||||
ginServer.Handle("POST", "/api/ai/chatGPT", model.CheckAuth, model.CheckReadonly, chatGPT)
|
||||
ginServer.Handle("POST", "/api/ai/chatGPTWithAction", model.CheckAuth, model.CheckReadonly, chatGPTWithAction)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue