refactor getChapter (#268)

* refactor

* better naming

* fix copytight notice
This commit is contained in:
Aria Moradi
2021-12-01 22:39:19 +03:30
committed by GitHub
parent f74f60bb1d
commit efff68c49b
4 changed files with 152 additions and 102 deletions

View File

@@ -13,6 +13,7 @@ import suwayomi.tachidesk.manga.impl.Chapter
import suwayomi.tachidesk.manga.impl.Library
import suwayomi.tachidesk.manga.impl.Manga
import suwayomi.tachidesk.manga.impl.Page
import suwayomi.tachidesk.manga.impl.chapter.getChapterDownloadReady
import suwayomi.tachidesk.manga.model.dataclass.MangaDataClass
import suwayomi.tachidesk.server.JavalinSetup.future
import suwayomi.tachidesk.server.util.handler
@@ -124,7 +125,7 @@ object MangaController {
fun chapterRetrieve(ctx: Context) {
val chapterIndex = ctx.pathParam("chapterIndex").toInt()
val mangaId = ctx.pathParam("mangaId").toInt()
ctx.future(future { Chapter.getChapter(chapterIndex, mangaId) })
ctx.future(future { getChapterDownloadReady(chapterIndex, mangaId) })
}
/** used to modify a chapter's parameters */