mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 将删除文档放到任务队列中执行
This commit is contained in:
parent
01a3a14ef6
commit
aad7dedc97
7 changed files with 27 additions and 43 deletions
|
|
@ -275,13 +275,7 @@ func removeDoc(c *gin.Context) {
|
|||
|
||||
notebook := arg["notebook"].(string)
|
||||
p := arg["path"].(string)
|
||||
|
||||
err := model.RemoveDoc(notebook, p)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
model.RemoveDoc(notebook, p)
|
||||
}
|
||||
|
||||
func removeDocs(c *gin.Context) {
|
||||
|
|
@ -298,12 +292,7 @@ func removeDocs(c *gin.Context) {
|
|||
for _, path := range pathsArg {
|
||||
paths = append(paths, path.(string))
|
||||
}
|
||||
err := model.RemoveDocs(paths)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
model.RemoveDocs(paths)
|
||||
}
|
||||
|
||||
func renameDoc(c *gin.Context) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue