From ed292b3af59f9b776f2482901114a4f9924e3b8b Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Fri, 24 Mar 2023 17:05:44 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20webfinger=E3=81=AB=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/dev/usbharu/hideout/routing/WellKnownRouting.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/routing/WellKnownRouting.kt b/src/main/kotlin/dev/usbharu/hideout/routing/WellKnownRouting.kt index b6398f6c..9db2d597 100644 --- a/src/main/kotlin/dev/usbharu/hideout/routing/WellKnownRouting.kt +++ b/src/main/kotlin/dev/usbharu/hideout/routing/WellKnownRouting.kt @@ -46,12 +46,12 @@ fun Application.wellKnown(userService: UserService) { } get("/webfinger") { - val uri = call.request.queryParameters["resource"] ?: return@get call.respond( - HttpStatusCode.BadRequest + val uri = call.request.queryParameters["resource"] ?: return@get call.respondText("resource was not found", + status = HttpStatusCode.BadRequest ) if (uri.startsWith("acct:")) { - return@get call.respond(HttpStatusCode.BadRequest) + return@get call.respondText("$uri was not found.",status =HttpStatusCode.BadRequest) } val accountName = uri.substringBeforeLast("@") val userEntity = userService.findByName(accountName)