mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-20 07:16:10 +01:00
🎨 Support listing database mirror blocks in a floating window https://github.com/siyuan-note/siyuan/issues/10538
This commit is contained in:
parent
b7e3e5fd8d
commit
58b76e8926
2 changed files with 14 additions and 0 deletions
|
|
@ -26,6 +26,19 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func getMirrorDatabaseBlocks(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)
|
||||
ret.Data = av.GetMirrorBlockIDs(avID)
|
||||
}
|
||||
|
||||
func searchTableView(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
|
|
@ -414,6 +414,7 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
ginServer.Handle("POST", "/api/av/getAttributeViewPrimaryKeyValues", model.CheckAuth, model.CheckReadonly, getAttributeViewPrimaryKeyValues)
|
||||
ginServer.Handle("POST", "/api/av/setDatabaseBlockView", model.CheckAuth, model.CheckReadonly, setDatabaseBlockView)
|
||||
ginServer.Handle("POST", "/api/av/searchTableView", model.CheckAuth, model.CheckReadonly, searchTableView)
|
||||
ginServer.Handle("POST", "/api/av/getMirrorDatabaseBlocks", model.CheckAuth, model.CheckReadonly, getMirrorDatabaseBlocks)
|
||||
|
||||
ginServer.Handle("POST", "/api/ai/chatGPT", model.CheckAuth, chatGPT)
|
||||
ginServer.Handle("POST", "/api/ai/chatGPTWithAction", model.CheckAuth, chatGPTWithAction)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue