mirror of https://github.com/usbharu/Hideout.git
feat: webfingerにログを追加
This commit is contained in:
parent
d77d5c77b0
commit
5d989d6827
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue