This commit is contained in:
Liang Ding 2022-08-06 00:00:23 +08:00
parent 229adee48c
commit e40bc18d86
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 44 additions and 3 deletions

View file

@ -598,8 +598,16 @@ func getDoc(c *gin.Context) {
if nil != s {
size = int(s.(float64))
}
startID := ""
endID := ""
startIDArg := arg["startID"]
endIDArg := arg["endID"]
if nil != startIDArg && nil != endIDArg {
startID = startIDArg.(string)
endID = endIDArg.(string)
}
blockCount, content, parentID, parent2ID, rootID, typ, eof, boxID, docPath, err := model.GetDoc(id, index, keyword, mode, size)
blockCount, content, parentID, parent2ID, rootID, typ, eof, boxID, docPath, err := model.GetDoc(startID, endID, id, index, keyword, mode, size)
if errors.Is(err, filelock.ErrUnableLockFile) {
ret.Code = 2
ret.Data = id