logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 8476eb1842dc60f440c9d928324c76f4393ba8fb
parent 88a35b2865103a0147669bcfe237f8e1bc8d0ec6
Author: Mark Felder <feld@feld.me>
Date:   Tue, 30 Jan 2024 14:20:02 -0500

Revert "Pleroma.Web.AdminAPI.MediaProxyCacheController: dialyzer errors"

This reverts commit 8b02c858102232700826214ffb5d58e5b2f90edf.

Diffstat:

Mlib/pleroma/web/admin_api/controllers/media_proxy_cache_controller.ex4++--
Mlib/pleroma/web/api_spec/operations/admin/media_proxy_cache_operation.ex10+++++-----
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/pleroma/web/admin_api/controllers/media_proxy_cache_controller.ex b/lib/pleroma/web/admin_api/controllers/media_proxy_cache_controller.ex @@ -59,12 +59,12 @@ defmodule Pleroma.Web.AdminAPI.MediaProxyCacheController do Enum.slice(entries, offset, page_size) 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) json(conn, %{}) 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) if ban do diff --git a/lib/pleroma/web/api_spec/operations/admin/media_proxy_cache_operation.ex b/lib/pleroma/web/api_spec/operations/admin/media_proxy_cache_operation.ex @@ -78,9 +78,9 @@ defmodule Pleroma.Web.ApiSpec.Admin.MediaProxyCacheOperation do "Parameters", %Schema{ type: :object, - required: ["urls"], + required: [:urls], properties: %{ - "urls" => %Schema{type: :array, items: %Schema{type: :string, format: :uri}} + urls: %Schema{type: :array, items: %Schema{type: :string, format: :uri}} } }, required: true @@ -104,10 +104,10 @@ defmodule Pleroma.Web.ApiSpec.Admin.MediaProxyCacheOperation do "Parameters", %Schema{ type: :object, - required: ["urls"], + required: [:urls], properties: %{ - "urls" => %Schema{type: :array, items: %Schema{type: :string, format: :uri}}, - "ban" => %Schema{type: :boolean, default: true} + urls: %Schema{type: :array, items: %Schema{type: :string, format: :uri}}, + ban: %Schema{type: :boolean, default: true} } }, required: true