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") }, %{ "rel" => "http://webfinger.net/rel/profile-page", "type" => "text/html", "href" => url(~p"/about") }, %{ "rel" => "http://webfinger.net/rel/avatar", "type" => "image/png", "href" => url(~p"/images/avatar.png") } ] } end end