Upgraded to latest aero version
This commit is contained in:
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
// NextIndex calculates the next index and sends HTTP header
|
||||
func NextIndex(ctx *aero.Context, allElementsLength int, elementsPerScroll int, index int) int {
|
||||
func NextIndex(ctx aero.Context, allElementsLength int, elementsPerScroll int, index int) int {
|
||||
nextIndex := index + elementsPerScroll
|
||||
|
||||
if nextIndex >= allElementsLength {
|
||||
@ -15,7 +15,7 @@ func NextIndex(ctx *aero.Context, allElementsLength int, elementsPerScroll int,
|
||||
}
|
||||
|
||||
// Send the index for the next request
|
||||
ctx.Response().Header().Set("X-LoadMore-Index", strconv.Itoa(nextIndex))
|
||||
ctx.Response().SetHeader("X-LoadMore-Index", strconv.Itoa(nextIndex))
|
||||
|
||||
return nextIndex
|
||||
}
|
||||
|
Reference in New Issue
Block a user