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

Commit

Permalink
fix content missing versions (#25)
Browse files Browse the repository at this point in the history
Signed-off-by: Ayman <[email protected]>
Co-authored-by: Ayman <[email protected]>
  • Loading branch information
khalifapro and enkhalifapro authored Feb 6, 2023
1 parent 74bfd7c commit da27581
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions cmd/confluence/confluence.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ func (j *DSConfluence) GetHistoricalContents(ctx *shared.Ctx, content map[string
headers,
nil,
nil,
map[[2]int]struct{}{{200, 200}: {}}, // JSON statuses: 200
nil, // Error statuses
map[[2]int]struct{}{{200, 200}: {}}, // JSON statuses: 200
nil, // Error statuses
map[[2]int]struct{}{{200, 200}: {}, {500, 500}: {}, {404, 404}: {}}, // OK statuses: 200
map[[2]int]struct{}{{200, 200}: {}}, // Cache statuses: 200
false, // retry
Expand Down Expand Up @@ -392,11 +392,9 @@ func (j *DSConfluence) GetHistoricalContents(ctx *shared.Ctx, content map[string
if err != nil {
return
}
if !when.Before(dateFrom) && !when.After(dateTo) {
result["content_url"] = contentURL
result["ancestors"] = ancestors
contents = append(contents, result)
}
result["content_url"] = contentURL
result["ancestors"] = ancestors
contents = append(contents, result)
if ctx.Debug > 2 {
j.log.WithFields(logrus.Fields{"operation": "GetHistoricalContents"}).Debugf("%s: v%d %+v,%v (%s)", id, version, when, latest, url)
}
Expand Down

0 comments on commit da27581

Please sign in to comment.