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()
This commit is contained in:
parent
cccfdde14c
commit
15621b7284
|
@ -54,12 +54,12 @@ def opts(request, options), do: %{request | opts: options}
|
|||
@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!(
|
||||
|
|
Loading…
Reference in New Issue