mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
🧑💻 Improve kernel API /api/filetree/getPathByID https://github.com/siyuan-note/siyuan/issues/14275
This commit is contained in:
parent
2d2420794c
commit
f8e6f02df8
4 changed files with 17 additions and 7 deletions
|
|
@ -1213,13 +1213,14 @@ func GetHPathByID(id string) (hPath string, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetPathByID(id string) (path string, err error) {
|
||||
func GetPathByID(id string) (path, boxID string, err error) {
|
||||
tree, err := LoadTreeByBlockID(id)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
path = tree.Path
|
||||
boxID = tree.Box
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue