mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-11 13:17:27 +08:00
[F] Fix wacca logging
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user