add pagination to recentChapters (#246)

* add pagination to recentChapters

* Use kotlin native library

Co-authored-by: Mitchell Syer <Mitchellptbo@gmail.com>

Co-authored-by: Mitchell Syer <Mitchellptbo@gmail.com>
This commit is contained in:
Aria Moradi
2021-11-08 18:45:52 +03:30
committed by GitHub
parent 420d14fc37
commit 30f7cdc1ba
5 changed files with 164 additions and 13 deletions

View File

@@ -14,9 +14,11 @@ import suwayomi.tachidesk.server.JavalinSetup.future
object UpdateController {
/** get recently updated manga chapters */
fun recentChapters(ctx: Context) {
val pageNum = ctx.pathParam("pageNum").toInt()
ctx.future(
future {
Chapter.getRecentChapters()
Chapter.getRecentChapters(pageNum)
}
)
}