Minor tweaks and get started on docs

This commit is contained in:
Mike Conrad
2025-05-22 17:03:35 -04:00
parent 47a520e945
commit 36be410d38
5 changed files with 37 additions and 5 deletions

View File

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