mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-11 23:04:33 -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:
@@ -11,7 +11,8 @@ import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceScreen
|
||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
||||
import eu.kanade.tachiyomi.source.sourcePreferences
|
||||
import io.javalin.plugin.json.JsonMapper
|
||||
import io.javalin.json.JsonMapper
|
||||
import io.javalin.json.fromJsonString
|
||||
import mu.KotlinLogging
|
||||
import org.jetbrains.exposed.sql.and
|
||||
import org.jetbrains.exposed.sql.insert
|
||||
@@ -131,11 +132,10 @@ object Source {
|
||||
value: String,
|
||||
getValue: (Preference) -> Any = { pref ->
|
||||
println(jsonMapper::class.java.name)
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
when (pref.defaultValueType) {
|
||||
"String" -> value
|
||||
"Boolean" -> value.toBoolean()
|
||||
"Set<String>" -> jsonMapper.fromJsonString(value, List::class.java as Class<List<String>>).toSet()
|
||||
"Set<String>" -> jsonMapper.fromJsonString<List<String>>(value).toSet()
|
||||
else -> throw RuntimeException("Unsupported type conversion")
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user