mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
This commit is contained in:
parent
8aaf556767
commit
4041af465b
2 changed files with 10 additions and 1 deletions
|
|
@ -40,7 +40,14 @@ func transferBlockRef(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fromID := arg["fromID"].(string)
|
fromID := arg["fromID"].(string)
|
||||||
|
if util.InvalidIDPattern(fromID, ret) {
|
||||||
|
return
|
||||||
|
}
|
||||||
toID := arg["toID"].(string)
|
toID := arg["toID"].(string)
|
||||||
|
if util.InvalidIDPattern(toID, ret) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
err := model.TransferBlockRef(fromID, toID)
|
err := model.TransferBlockRef(fromID, toID)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
ret.Code = -1
|
ret.Code = -1
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,13 @@ import (
|
||||||
func FixIndexJob() {
|
func FixIndexJob() {
|
||||||
task.AppendTask(task.DatabaseIndexFix, removeDuplicateDatabaseIndex)
|
task.AppendTask(task.DatabaseIndexFix, removeDuplicateDatabaseIndex)
|
||||||
sql.WaitForWritingDatabase()
|
sql.WaitForWritingDatabase()
|
||||||
|
|
||||||
task.AppendTask(task.DatabaseIndexFix, fixBlockTreeByFileSys)
|
task.AppendTask(task.DatabaseIndexFix, fixBlockTreeByFileSys)
|
||||||
sql.WaitForWritingDatabase()
|
sql.WaitForWritingDatabase()
|
||||||
task.AppendTask(task.DatabaseIndexFix, fixDatabaseIndexByBlockTree)
|
|
||||||
|
|
||||||
|
task.AppendTask(task.DatabaseIndexFix, fixDatabaseIndexByBlockTree)
|
||||||
sql.WaitForWritingDatabase()
|
sql.WaitForWritingDatabase()
|
||||||
|
|
||||||
util.PushStatusBar(Conf.Language(185))
|
util.PushStatusBar(Conf.Language(185))
|
||||||
debug.FreeOSMemory()
|
debug.FreeOSMemory()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue