AttachmentValidator: Check if the mime type is valid.
[akkoma] / lib / pleroma / web / controller_helper.ex
index 5a1316a5f166f5871be0cb75e059de9299f96735..bf832fe940be37f6f0e6437dd9dfb5def84666e8 100644 (file)
@@ -99,11 +99,6 @@ defmodule Pleroma.Web.ControllerHelper do
     render_error(conn, :not_implemented, "Can't display this activity")
   end
 
-  @spec put_if_exist(map(), atom() | String.t(), any) :: map()
-  def put_if_exist(map, _key, nil), do: map
-
-  def put_if_exist(map, key, value), do: Map.put(map, key, value)
-
   @doc """
   Returns true if request specifies to include embedded relationships in account objects.
   May only be used in selected account-related endpoints; has no effect for status- or