Use proper name for reader url chapter "index" param

It's not the index of the chapter but the source order, which is starting at 1 and not 0
This commit is contained in:
schroda
2024-12-31 13:54:16 +01:00
parent 17cf8ec9d0
commit 899364ac85
2 changed files with 12 additions and 12 deletions

View File

@@ -150,8 +150,8 @@ export const AppRoutes = {
path: '/tracker/login/oauth',
},
reader: {
match: '/manga/:mangaId/chapter/:chapterIndex/*',
path: (mangaId: MangaIdInfo['id'], chapterIndex: ChapterSourceOrderInfo['sourceOrder']) =>
`/manga/${mangaId}/chapter/${chapterIndex}`,
match: '/manga/:mangaId/chapter/:chapterSourceOrder/*',
path: (mangaId: MangaIdInfo['id'], chapterSourceOrder: ChapterSourceOrderInfo['sourceOrder']) =>
`/manga/${mangaId}/chapter/${chapterSourceOrder}`,
},
} satisfies TAppRoutes;