mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-05 16:39:47 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -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!(
|
||||
|
|
Loading…
Reference in a new issue