Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

Commit da27581

Browse files
fix content missing versions (#25)
Signed-off-by: Ayman <enkhalifapro@gmail.com> Co-authored-by: Ayman <enkhalifapro@gmail.com>
1 parent 74bfd7c commit da27581

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

cmd/confluence/confluence.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ func (j *DSConfluence) GetHistoricalContents(ctx *shared.Ctx, content map[string
348348
headers,
349349
nil,
350350
nil,
351-
map[[2]int]struct{}{{200, 200}: {}}, // JSON statuses: 200
352-
nil, // Error statuses
351+
map[[2]int]struct{}{{200, 200}: {}}, // JSON statuses: 200
352+
nil, // Error statuses
353353
map[[2]int]struct{}{{200, 200}: {}, {500, 500}: {}, {404, 404}: {}}, // OK statuses: 200
354354
map[[2]int]struct{}{{200, 200}: {}}, // Cache statuses: 200
355355
false, // retry
@@ -392,11 +392,9 @@ func (j *DSConfluence) GetHistoricalContents(ctx *shared.Ctx, content map[string
392392
if err != nil {
393393
return
394394
}
395-
if !when.Before(dateFrom) && !when.After(dateTo) {
396-
result["content_url"] = contentURL
397-
result["ancestors"] = ancestors
398-
contents = append(contents, result)
399-
}
395+
result["content_url"] = contentURL
396+
result["ancestors"] = ancestors
397+
contents = append(contents, result)
400398
if ctx.Debug > 2 {
401399
j.log.WithFields(logrus.Fields{"operation": "GetHistoricalContents"}).Debugf("%s: v%d %+v,%v (%s)", id, version, when, latest, url)
402400
}

0 commit comments

Comments
 (0)