mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-17 12:38:07 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
96271bd284
4 changed files with 16 additions and 0 deletions
|
|
@ -27,6 +27,19 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func reloadAttributeView(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
id := arg["id"].(string)
|
||||
model.ReloadAttrView(id)
|
||||
}
|
||||
|
||||
func duplicateAttributeViewBlock(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
|
|
@ -452,6 +452,7 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
ginServer.Handle("POST", "/api/av/getAttributeViewKeysByAvID", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, getAttributeViewKeysByAvID)
|
||||
ginServer.Handle("POST", "/api/av/duplicateAttributeViewBlock", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, duplicateAttributeViewBlock)
|
||||
ginServer.Handle("POST", "/api/av/appendAttributeViewDetachedBlocksWithValues", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, appendAttributeViewDetachedBlocksWithValues)
|
||||
ginServer.Handle("POST", "/api/av/reloadAttributeView", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, reloadAttributeView)
|
||||
|
||||
ginServer.Handle("POST", "/api/ai/chatGPT", model.CheckAuth, model.CheckAdminRole, chatGPT)
|
||||
ginServer.Handle("POST", "/api/ai/chatGPTWithAction", model.CheckAuth, model.CheckAdminRole, chatGPTWithAction)
|
||||
|
|
|
|||
|
|
@ -1080,6 +1080,7 @@ func CreateDailyNote(boxID string) (p string, existed bool, err error) {
|
|||
|
||||
FlushTxQueue()
|
||||
|
||||
hPath = util.TrimSpaceInPath(hPath)
|
||||
existRoot := treenode.GetBlockTreeRootByHPath(box.ID, hPath)
|
||||
if nil != existRoot {
|
||||
existed = true
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ func createDocsByHPath(boxID, hPath, content, parentID, id string) (retID string
|
|||
retID = id
|
||||
|
||||
hPath = strings.TrimSuffix(hPath, ".sy")
|
||||
hPath = util.TrimSpaceInPath(hPath)
|
||||
if "" != parentID {
|
||||
// The save path is incorrect when creating a sub-doc by ref in a doc with the same name https://github.com/siyuan-note/siyuan/issues/8138
|
||||
// 在指定了父文档 ID 的情况下优先查找父文档
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue