feat: ログを詳細に

This commit is contained in:
usbharu 2023-04-08 16:39:47 +09:00
parent 2f15b0e3e4
commit 88fd245d3f
2 changed files with 1 additions and 2 deletions

View File

@ -8,6 +8,5 @@ import io.ktor.server.application.*
fun Application.configureMonitoring() {
install(CallLogging) {
level = Level.INFO
filter { call -> call.request.path().startsWith("/") }
}
}

View File

@ -18,7 +18,7 @@ fun Routing.usersAP(activityPubUserService: ActivityPubUserService) {
call.parameters["name"] ?: throw ParameterNotExistException("Parameter(name='name') does not exist.")
val person = activityPubUserService.getPersonByName(name)
call.response.header("Content-Type", ContentType.Application.Activity.toString())
call.respond(HttpStatusCode.OK, Config.configData.objectMapper.writeValueAsString(person))
return@handle call.respond(HttpStatusCode.OK, Config.configData.objectMapper.writeValueAsString(person))
}
}
}