fix: レスポンスコードを修正

This commit is contained in:
usbharu 2023-04-01 08:46:32 +09:00
parent 601f487967
commit 3823791372
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
1 changed files with 2 additions and 2 deletions

View File

@ -25,15 +25,15 @@ fun Application.userActivityPubRouting(activityPubService: ActivityPubService, a
} }
val bodyText = call.receiveText() val bodyText = call.receiveText()
println(bodyText) println(bodyText)
call.respond(HttpStatusCode.OK)
when (activityPubService.switchApType(bodyText)) { when (activityPubService.switchApType(bodyText)) {
ActivityPubService.ActivityType.Follow -> { ActivityPubService.ActivityType.Follow -> {
val readValue = Config.configData.objectMapper.readValue<Follow>(bodyText) val readValue = Config.configData.objectMapper.readValue<Follow>(bodyText)
activityPubUserService.receiveFollow(readValue) activityPubUserService.receiveFollow(readValue)
return@post return@post call.respond(HttpStatusCode.Created)
} }
ActivityPubService.ActivityType.Undo -> { ActivityPubService.ActivityType.Undo -> {
call.respond(HttpStatusCode.BadGateway)
TODO() TODO()
} }
} }