Upgraded to latest aero version

This commit is contained in:
2019-06-01 13:55:49 +09:00
parent ae591e5e7e
commit 28db818c37
196 changed files with 645 additions and 593 deletions

View File

@ -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
}