Revert "Pleroma.Web.AdminAPI.MediaProxyCacheController: dialyzer errors"
This reverts commit 8b02c85810
.
This commit is contained in:
parent
88a35b2865
commit
8476eb1842
|
@ -59,12 +59,12 @@ defp paginate_entries(entries, page, page_size) do
|
||||||
Enum.slice(entries, offset, page_size)
|
Enum.slice(entries, offset, page_size)
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete(%{assigns: %{user: _}, body_params: %{"urls" => urls}} = conn, _) do
|
def delete(%{assigns: %{user: _}, body_params: %{urls: urls}} = conn, _) do
|
||||||
MediaProxy.remove_from_banned_urls(urls)
|
MediaProxy.remove_from_banned_urls(urls)
|
||||||
json(conn, %{})
|
json(conn, %{})
|
||||||
end
|
end
|
||||||
|
|
||||||
def purge(%{assigns: %{user: _}, body_params: %{"urls" => urls, "ban" => ban}} = conn, _) do
|
def purge(%{assigns: %{user: _}, body_params: %{urls: urls, ban: ban}} = conn, _) do
|
||||||
MediaProxy.Invalidation.purge(urls)
|
MediaProxy.Invalidation.purge(urls)
|
||||||
|
|
||||||
if ban do
|
if ban do
|
||||||
|
|
|
@ -78,9 +78,9 @@ def delete_operation do
|
||||||
"Parameters",
|
"Parameters",
|
||||||
%Schema{
|
%Schema{
|
||||||
type: :object,
|
type: :object,
|
||||||
required: ["urls"],
|
required: [:urls],
|
||||||
properties: %{
|
properties: %{
|
||||||
"urls" => %Schema{type: :array, items: %Schema{type: :string, format: :uri}}
|
urls: %Schema{type: :array, items: %Schema{type: :string, format: :uri}}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
required: true
|
required: true
|
||||||
|
@ -104,10 +104,10 @@ def purge_operation do
|
||||||
"Parameters",
|
"Parameters",
|
||||||
%Schema{
|
%Schema{
|
||||||
type: :object,
|
type: :object,
|
||||||
required: ["urls"],
|
required: [:urls],
|
||||||
properties: %{
|
properties: %{
|
||||||
"urls" => %Schema{type: :array, items: %Schema{type: :string, format: :uri}},
|
urls: %Schema{type: :array, items: %Schema{type: :string, format: :uri}},
|
||||||
"ban" => %Schema{type: :boolean, default: true}
|
ban: %Schema{type: :boolean, default: true}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
required: true
|
required: true
|
||||||
|
|
Loading…
Reference in New Issue