mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-09 22:04:34 -05:00
Update dependency io.javalin:javalin to v6 (#1152)
* Update dependency io.javalin:javalin to v6 * Simple compile fixes * Simple compile fixes pass 2 * Add results to futures * Setup jetty server and api routes * Setup Cors * Setup basic auth * Documentation stubs * Replace chapter mutex cache * Fix compile * Disable Jetty Logging --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Syer10 <syer10@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package suwayomi.tachidesk.manga.controller
|
||||
|
||||
import io.javalin.http.HttpCode
|
||||
import io.javalin.http.HttpStatus
|
||||
import io.javalin.websocket.WsConfig
|
||||
import mu.KotlinLogging
|
||||
import suwayomi.tachidesk.manga.impl.Category
|
||||
@@ -39,14 +39,14 @@ object UpdateController {
|
||||
}
|
||||
},
|
||||
behaviorOf = { ctx, pageNum ->
|
||||
ctx.future(
|
||||
ctx.future {
|
||||
future {
|
||||
Chapter.getRecentChapters(pageNum)
|
||||
},
|
||||
)
|
||||
}.thenApply { ctx.json(it) }
|
||||
}
|
||||
},
|
||||
withResults = {
|
||||
json<PagedMangaChapterListDataClass>(HttpCode.OK)
|
||||
json<PagedMangaChapterListDataClass>(HttpStatus.OK)
|
||||
},
|
||||
)
|
||||
|
||||
@@ -84,13 +84,13 @@ object UpdateController {
|
||||
)
|
||||
} else {
|
||||
logger.info { "No Category found" }
|
||||
ctx.status(HttpCode.BAD_REQUEST)
|
||||
ctx.status(HttpStatus.BAD_REQUEST)
|
||||
}
|
||||
}
|
||||
},
|
||||
withResults = {
|
||||
httpCode(HttpCode.OK)
|
||||
httpCode(HttpCode.BAD_REQUEST)
|
||||
httpCode(HttpStatus.OK)
|
||||
httpCode(HttpStatus.BAD_REQUEST)
|
||||
},
|
||||
)
|
||||
|
||||
@@ -119,7 +119,7 @@ object UpdateController {
|
||||
ctx.json(updater.statusDeprecated.value)
|
||||
},
|
||||
withResults = {
|
||||
json<UpdateStatus>(HttpCode.OK)
|
||||
json<UpdateStatus>(HttpStatus.OK)
|
||||
},
|
||||
)
|
||||
|
||||
@@ -134,16 +134,16 @@ object UpdateController {
|
||||
behaviorOf = { ctx ->
|
||||
val updater = Injekt.get<IUpdater>()
|
||||
logger.info { "Resetting Updater" }
|
||||
ctx.future(
|
||||
ctx.future {
|
||||
future {
|
||||
updater.reset()
|
||||
}.thenApply {
|
||||
ctx.status(HttpCode.OK)
|
||||
},
|
||||
)
|
||||
ctx.status(HttpStatus.OK)
|
||||
}
|
||||
}
|
||||
},
|
||||
withResults = {
|
||||
httpCode(HttpCode.OK)
|
||||
httpCode(HttpStatus.OK)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user