From d5232c6a7ffde0ce3671712dbfe1248725230ee4 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Fri, 21 Apr 2023 20:10:27 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AB=E3=83=95=E3=82=A9=E3=83=AD?= =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=81=AE=E6=83=85=E5=A0=B1=E3=82=92=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dev/usbharu/hideout/routing/activitypub/UserRouting.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/routing/activitypub/UserRouting.kt b/src/main/kotlin/dev/usbharu/hideout/routing/activitypub/UserRouting.kt index 9d4a99e1..66fc511c 100644 --- a/src/main/kotlin/dev/usbharu/hideout/routing/activitypub/UserRouting.kt +++ b/src/main/kotlin/dev/usbharu/hideout/routing/activitypub/UserRouting.kt @@ -12,7 +12,7 @@ import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.routing.* -fun Routing.usersAP(activityPubUserService: ActivityPubUserService,userService:UserService) { +fun Routing.usersAP(activityPubUserService: ActivityPubUserService, userService: UserService) { route("/users/{name}") { createChild(ContentTypeRouteSelector(ContentType.Application.Activity, ContentType.Application.JsonLd)).handle { val name = @@ -24,7 +24,8 @@ fun Routing.usersAP(activityPubUserService: ActivityPubUserService,userService:U ) } get { - call.respondText(userService.findByName(call.parameters["name"]!!).toString()) + val userEntity = userService.findByName(call.parameters["name"]!!) + call.respondText(userEntity.toString() + "\n" + userService.findFollowersById(userEntity.id)) } } }