Minor tweaks and get started on docs
This commit is contained in:
@ -34,7 +34,7 @@ export default class ReplaysController {
|
||||
return response.json(responseData)
|
||||
}
|
||||
|
||||
public async list({ request, inertia }: HttpContext) {
|
||||
public async home({ request, inertia }: HttpContext) {
|
||||
const page = request.input('page', 1)
|
||||
const perPage = 20
|
||||
const cacheKey = `replays:page:${page}`
|
||||
@ -46,7 +46,7 @@ export default class ReplaysController {
|
||||
;({ paginated, meta, replays } = JSON.parse(data))
|
||||
} else {
|
||||
paginated = await Replay.query().paginate(page, perPage)
|
||||
paginated.baseUrl('/list')
|
||||
paginated.baseUrl('/')
|
||||
|
||||
const json = paginated.toJSON()
|
||||
|
||||
@ -101,7 +101,7 @@ function buildPaginationLinks(meta: {
|
||||
|
||||
for (let page = 1; page <= meta.lastPage; page++) {
|
||||
links.push({
|
||||
url: `/list?page=${page}`,
|
||||
url: `/?page=${page}`,
|
||||
label: page.toString(),
|
||||
active: page === meta.currentPage,
|
||||
})
|
||||
|
Reference in New Issue
Block a user