logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: 374e8c85a789d401ceb42567f4c5030124f261f3
parent 43a124bb14d385382c8b16da7d229d9ec7cd1205
Author: lain <lain@soykaf.club>
Date:   Thu, 29 May 2025 08:17:31 +0000

Apply lambadalambda's suggestion(s) to 1 file(s)

Diffstat:

Mlib/pleroma/web/web_finger/web_finger_controller.ex11++---------
1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/lib/pleroma/web/web_finger/web_finger_controller.ex b/lib/pleroma/web/web_finger/web_finger_controller.ex @@ -42,15 +42,8 @@ defmodule Pleroma.Web.WebFinger.WebFingerController do end # Default to JSON when no format is specified or format is not recognized - def webfinger(%{assigns: %{format: _format}} = conn, %{"resource" => resource}) do - with {:ok, response} <- WebFinger.webfinger(resource, "JSON") do - json(conn, response) - else - _e -> - conn - |> put_status(404) - |> json("Couldn't find user") - end + def webfinger(%{assigns: %{format: _format}} = conn, %{"resource" => _resource} = params) do + webfinger(put_in(conn.assigns.format, "json"), params) end def webfinger(conn, _params), do: send_resp(conn, 400, "Bad Request")