🎨 将删除文档放到任务队列中执行

This commit is contained in:
Liang Ding 2023-01-19 21:36:56 +08:00
parent 01a3a14ef6
commit aad7dedc97
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 27 additions and 43 deletions

View file

@ -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) {