aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-server-jooby/src/main/kotlin/pl
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-server-jooby/src/main/kotlin/pl')
-rw-r--r--kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt8
-rw-r--r--kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt6
-rw-r--r--kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/types/Date.kt2
3 files changed, 2 insertions, 14 deletions
diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt
index 9ae6d0e7..34b2877f 100644
--- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt
+++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt
@@ -21,17 +21,11 @@
*/
package pl.treksoft.kvision.remote
-import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import org.jooby.Kooby
import org.jooby.json.Jackson
-import pl.treksoft.kvision.types.KV_JSON_DATE_FORMAT
-import java.text.SimpleDateFormat
fun Kooby.kvisionInit() {
assets("/", "/assets/index.html")
assets("/**", "/assets/{0}").onMissing(0)
- val mapper = jacksonObjectMapper().apply {
- dateFormat = SimpleDateFormat(KV_JSON_DATE_FORMAT)
- }
- use(Jackson(mapper))
+ use(Jackson())
}
diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
index 456bb901..d1e64ce4 100644
--- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
+++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
@@ -31,8 +31,6 @@ import org.jooby.Request
import org.jooby.Response
import org.slf4j.Logger
import org.slf4j.LoggerFactory
-import pl.treksoft.kvision.types.KV_JSON_DATE_FORMAT
-import java.text.SimpleDateFormat
import kotlin.reflect.KClass
/**
@@ -46,9 +44,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
}
val routes: MutableList<Kooby.() -> Unit> = mutableListOf()
- val mapper = jacksonObjectMapper().apply {
- dateFormat = SimpleDateFormat(KV_JSON_DATE_FORMAT)
- }
+ val mapper = jacksonObjectMapper()
var counter: Int = 0
/**
diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
index 86fab30a..b1f72d6f 100644
--- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
+++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
@@ -25,8 +25,6 @@ import java.text.SimpleDateFormat
actual val KV_DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"
-actual val KV_JSON_DATE_FORMAT = "yyyy-MM-dd HH:mm:ssZ"
-
actual typealias Date = java.util.Date
actual fun String.toDateF(format: String): Date = SimpleDateFormat(format).parse(this)