When settting tokens for new paginated response, we also need to delete pageTokens that don't have a following page, otherwise the last token for a page would always be present and the PaginationHeader method would never find the exiting condition to return "".
Example: pkg/groups/handlers.go
for apiType, token := range pageTokens {
paginator.SetToken(r.Context(), apiType, token)
}
Old tokens would remain in the paginator and still end up in the base64 digest.
Description
When settting tokens for new paginated response, we also need to delete pageTokens that don't have a following page, otherwise the last token for a page would always be present and the
PaginationHeader
method would never find the exiting condition to return""
.Example:
pkg/groups/handlers.go
Old tokens would remain in the paginator and still end up in the base64 digest.