mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 08:48:49 +01:00
♻️ Extract method util.GetTreeID
This commit is contained in:
parent
c295a496d7
commit
6f7e106be4
11 changed files with 26 additions and 27 deletions
|
|
@ -19,8 +19,6 @@ package api
|
|||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/88250/lute"
|
||||
|
|
@ -113,7 +111,7 @@ func appendDailyNoteBlock(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
parentID := strings.TrimSuffix(path.Base(p), ".sy")
|
||||
parentID := util.GetTreeID(p)
|
||||
transactions := []*model.Transaction{
|
||||
{
|
||||
DoOperations: []*model.Operation{
|
||||
|
|
@ -166,7 +164,7 @@ func prependDailyNoteBlock(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
parentID := strings.TrimSuffix(path.Base(p), ".sy")
|
||||
parentID := util.GetTreeID(p)
|
||||
transactions := []*model.Transaction{
|
||||
{
|
||||
DoOperations: []*model.Operation{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue