Documentation cleanup (#417)

This commit is contained in:
Mitchell Syer
2022-10-11 05:24:45 -04:00
committed by GitHub
parent f2d1c6e3cb
commit 71730fddad
4 changed files with 17 additions and 10 deletions

View File

@@ -92,7 +92,7 @@ object BackupController {
)
},
withResults = {
mime(HttpCode.OK, "application/octet-stream")
stream(HttpCode.OK)
}
)
@@ -124,7 +124,7 @@ object BackupController {
)
},
withResults = {
mime(HttpCode.OK, "application/octet-stream")
stream(HttpCode.OK)
}
)

View File

@@ -158,7 +158,7 @@ object ExtensionController {
)
},
withResults = {
httpCode(HttpCode.OK)
image(HttpCode.OK)
httpCode(HttpCode.NOT_FOUND)
}
)

View File

@@ -23,6 +23,7 @@ import suwayomi.tachidesk.server.util.handler
import suwayomi.tachidesk.server.util.pathParam
import suwayomi.tachidesk.server.util.queryParam
import suwayomi.tachidesk.server.util.withOperation
import kotlin.time.Duration.Companion.days
object MangaController {
/** get manga info */
@@ -63,14 +64,14 @@ object MangaController {
future { Manga.getMangaThumbnail(mangaId, useCache) }
.thenApply {
ctx.header("content-type", it.second)
val httpCacheSeconds = 60 * 60 * 24
val httpCacheSeconds = 1.days.inWholeSeconds
ctx.header("cache-control", "max-age=$httpCacheSeconds")
it.first
}
)
},
withResults = {
mime(HttpCode.OK, "image/*")
image(HttpCode.OK)
httpCode(HttpCode.NOT_FOUND)
}
)
@@ -319,7 +320,7 @@ object MangaController {
)
},
withResults = {
mime(HttpCode.OK, "image/*")
image(HttpCode.OK)
httpCode(HttpCode.NOT_FOUND)
}
)