feat: Getリクエストのログを追加

This commit is contained in:
usbharu 2023-04-29 15:24:28 +09:00
parent b0551ade76
commit d2971d02a5
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,8 @@ import io.ktor.server.routing.*
fun Routing.usersAP(activityPubUserService: ActivityPubUserService, userService: IUserService) { fun Routing.usersAP(activityPubUserService: ActivityPubUserService, userService: IUserService) {
route("/users/{name}") { route("/users/{name}") {
createChild(ContentTypeRouteSelector(ContentType.Application.Activity, ContentType.Application.JsonLd)).handle { createChild(ContentTypeRouteSelector(ContentType.Application.Activity, ContentType.Application.JsonLd)).handle {
call.application.log.debug("Signature: ${call.request.header("Signature")}")
call.application.log.debug("Authorization: ${call.request.header("Authorization")}")
val name = val name =
call.parameters["name"] ?: throw ParameterNotExistException("Parameter(name='name') does not exist.") call.parameters["name"] ?: throw ParameterNotExistException("Parameter(name='name') does not exist.")
val person = activityPubUserService.getPersonByName(name) val person = activityPubUserService.getPersonByName(name)