mirror of
https://github.com/usbharu/Hideout.git
synced 2026-07-03 04:07:53 +00:00
feat: webfingerにログを追加
This commit is contained in:
@@ -46,12 +46,12 @@ fun Application.wellKnown(userService: UserService) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get("/webfinger") {
|
get("/webfinger") {
|
||||||
val uri = call.request.queryParameters["resource"] ?: return@get call.respond(
|
val uri = call.request.queryParameters["resource"] ?: return@get call.respondText("resource was not found",
|
||||||
HttpStatusCode.BadRequest
|
status = HttpStatusCode.BadRequest
|
||||||
)
|
)
|
||||||
|
|
||||||
if (uri.startsWith("acct:")) {
|
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 accountName = uri.substringBeforeLast("@")
|
||||||
val userEntity = userService.findByName(accountName)
|
val userEntity = userService.findByName(accountName)
|
||||||
|
|||||||
Reference in New Issue
Block a user