mirror of https://github.com/hykilpikonna/AquaDX
[F] Fix wacca logging
parent
d3d7b5a5c7
commit
bb4c9477da
|
@ -83,10 +83,10 @@ class WaccaServer {
|
||||||
|
|
||||||
val br = JACKSON.parse<BaseRequest>(body)
|
val br = JACKSON.parse<BaseRequest>(body)
|
||||||
handlerMap[path]!!(br, br.params).let { when (it) {
|
handlerMap[path]!!(br, br.params).let { when (it) {
|
||||||
is String -> return resp(it)
|
is String -> resp(it)
|
||||||
is List<*> -> return resp(it.toJson())
|
is List<*> -> resp(it.toJson())
|
||||||
else -> Error("Invalid response type ${it.javaClass}")
|
else -> error("Invalid response type ${it.javaClass}")
|
||||||
} }.let { log.info("Wacca > $path : $it") }
|
} }.also { log.info("Wacca > $path : ${it.body}") }
|
||||||
}
|
}
|
||||||
catch (e: ApiException) { resp("[]", e.code, e.message ?: "") }
|
catch (e: ApiException) { resp("[]", e.code, e.message ?: "") }
|
||||||
catch (e: Exception) {
|
catch (e: Exception) {
|
||||||
|
|
Loading…
Reference in New Issue