logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 15621b72842ad7dc1b1be1a480045498cf815f9b
parent cccfdde14c6742b7bbad0d4e0e25d4b641c721be
Author: Mark Felder <feld@feld.me>
Date:   Wed, 31 Jan 2024 13:58:26 -0500

Pleroma.HTTP.RequestBuilder: fix gradient error

lib/pleroma/http/request_builder.ex: The variable key on line 69 is expected to have type String.t() but it has type atom()

Diffstat:

Mlib/pleroma/http/request_builder.ex4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/pleroma/http/request_builder.ex b/lib/pleroma/http/request_builder.ex @@ -54,12 +54,12 @@ defmodule Pleroma.HTTP.RequestBuilder do @doc """ Add optional parameters to the request """ - @spec add_param(Request.t(), atom(), atom(), any()) :: Request.t() + @spec add_param(Request.t(), atom(), atom() | String.t(), any()) :: Request.t() def add_param(request, :query, :query, values), do: %{request | query: values} def add_param(request, :body, :body, value), do: %{request | body: value} - def add_param(request, :body, key, value) do + def add_param(request, :body, key, value) when is_binary(key) do request |> Map.put(:body, Multipart.new()) |> Map.update!(