From cbddc11e675640b2e7d39ec0c23848db9416c18a Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sat, 20 May 2023 15:29:44 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20Users=E3=81=AE=E3=83=AB=E3=83=BC?= =?UTF-8?q?=E3=83=86=E3=82=A3=E3=83=B3=E3=82=B0=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/dev/usbharu/hideout/Application.kt | 3 ++- src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/Application.kt b/src/main/kotlin/dev/usbharu/hideout/Application.kt index 6a6dbf15..58f587df 100644 --- a/src/main/kotlin/dev/usbharu/hideout/Application.kt +++ b/src/main/kotlin/dev/usbharu/hideout/Application.kt @@ -104,7 +104,8 @@ fun Application.parent() { inject().value, inject().value, inject().value, - inject().value + inject().value, + inject().value, ) } diff --git a/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt b/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt index 1d7cce98..3661fcb9 100644 --- a/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt +++ b/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt @@ -4,9 +4,11 @@ import dev.usbharu.hideout.routing.activitypub.inbox import dev.usbharu.hideout.routing.activitypub.outbox import dev.usbharu.hideout.routing.activitypub.usersAP import dev.usbharu.hideout.routing.api.internal.v1.posts +import dev.usbharu.hideout.routing.api.internal.v1.users import dev.usbharu.hideout.routing.api.mastodon.v1.statuses import dev.usbharu.hideout.routing.wellknown.webfinger import dev.usbharu.hideout.service.IPostService +import dev.usbharu.hideout.service.IUserApiService import dev.usbharu.hideout.service.activitypub.ActivityPubService import dev.usbharu.hideout.service.activitypub.ActivityPubUserService import dev.usbharu.hideout.service.impl.IUserService @@ -20,7 +22,8 @@ fun Application.configureRouting( activityPubService: ActivityPubService, userService: IUserService, activityPubUserService: ActivityPubUserService, - postService: IPostService + postService: IPostService, + userApiService: IUserApiService ) { install(AutoHeadResponse) routing { @@ -34,6 +37,7 @@ fun Application.configureRouting( } route("/api/internal/v1") { posts(postService) + users(userService, userApiService) } } }