mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-10 14:24:34 -05:00
closes #131
This commit is contained in:
@@ -71,9 +71,10 @@ object ExtensionController {
|
||||
/** icon for extension named `apkName` */
|
||||
fun icon(ctx: Context) {
|
||||
val apkName = ctx.pathParam("apkName")
|
||||
val useCache = ctx.queryParam("useCache")?.toBoolean() ?: true
|
||||
|
||||
ctx.future(
|
||||
future { Extension.getExtensionIcon(apkName) }
|
||||
future { Extension.getExtensionIcon(apkName, useCache) }
|
||||
.thenApply {
|
||||
ctx.header("content-type", it.second)
|
||||
it.first
|
||||
|
||||
@@ -31,9 +31,10 @@ object MangaController {
|
||||
/** manga thumbnail */
|
||||
fun thumbnail(ctx: Context) {
|
||||
val mangaId = ctx.pathParam("mangaId").toInt()
|
||||
val useCache = ctx.queryParam("useCache")?.toBoolean() ?: true
|
||||
|
||||
ctx.future(
|
||||
future { Manga.getMangaThumbnail(mangaId) }
|
||||
future { Manga.getMangaThumbnail(mangaId, useCache) }
|
||||
.thenApply {
|
||||
ctx.header("content-type", it.second)
|
||||
it.first
|
||||
@@ -152,9 +153,10 @@ object MangaController {
|
||||
val mangaId = ctx.pathParam("mangaId").toInt()
|
||||
val chapterIndex = ctx.pathParam("chapterIndex").toInt()
|
||||
val index = ctx.pathParam("index").toInt()
|
||||
val useCache = ctx.queryParam("useCache")?.toBoolean() ?: true
|
||||
|
||||
ctx.future(
|
||||
future { Page.getPageImage(mangaId, chapterIndex, index) }
|
||||
future { Page.getPageImage(mangaId, chapterIndex, index, useCache) }
|
||||
.thenApply {
|
||||
ctx.header("content-type", it.second)
|
||||
it.first
|
||||
|
||||
Reference in New Issue
Block a user