20 lines
483 B
Elixir
20 lines
483 B
Elixir
defmodule PostlandWeb.WebfingerJSON do
|
|
use Phoenix.VerifiedRoutes, endpoint: PostlandWeb.Endpoint, router: PostlandWeb.Router
|
|
|
|
alias Postland.Accounts
|
|
|
|
def render("webfinger.json", _assigns) do
|
|
user = Accounts.solo_user()
|
|
|
|
%{
|
|
subject: "acct:#{user.username}@#{PostlandWeb.Endpoint.host()}",
|
|
links: [
|
|
%{
|
|
"rel" => "self",
|
|
"type" => "application/activity+json",
|
|
"href" => url(~p"/actor")
|
|
}
|
|
]
|
|
}
|
|
end
|
|
end
|