[F] Fix wacca logging

This commit is contained in:
Azalea 2024-03-29 21:11:28 -04:00
parent d3d7b5a5c7
commit bb4c9477da

View File

@ -83,10 +83,10 @@ class WaccaServer {
val br = JACKSON.parse<BaseRequest>(body)
handlerMap[path]!!(br, br.params).let { when (it) {
is String -> return resp(it)
is List<*> -> return resp(it.toJson())
else -> Error("Invalid response type ${it.javaClass}")
} }.let { log.info("Wacca > $path : $it") }
is String -> resp(it)
is List<*> -> resp(it.toJson())
else -> error("Invalid response type ${it.javaClass}")
} }.also { log.info("Wacca > $path : ${it.body}") }
}
catch (e: ApiException) { resp("[]", e.code, e.message ?: "") }
catch (e: Exception) {