Remove unused functions

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-10-05 15:29:06 +02:00
parent 5d8d2e80a5
commit f4284e1d3a
41 changed files with 114 additions and 714 deletions

View File

@@ -29,9 +29,9 @@ defmodule Mobilizon.GraphQL.API.Events do
@doc """
Trigger the deletion of an event
"""
@spec delete_event(Event.t(), Actor.t(), boolean()) :: {:ok, Activity.t(), Entity.t()} | any()
def delete_event(%Event{} = event, %Actor{} = actor, federate \\ true) do
Actions.Delete.delete(event, actor, federate)
@spec delete_event(Event.t(), Actor.t()) :: {:ok, Activity.t(), Entity.t()} | any()
def delete_event(%Event{} = event, %Actor{} = actor) do
Actions.Delete.delete(event, actor, true)
end
@spec prepare_args(map) :: map

View File

@@ -3,7 +3,7 @@ defmodule Mobilizon.GraphQL.API.Utils do
Utils for API.
"""
alias Mobilizon.{Config, Medias}
alias Mobilizon.Medias
alias Mobilizon.Medias.Media
alias Mobilizon.Service.Formatter
@@ -30,18 +30,6 @@ defmodule Mobilizon.GraphQL.API.Utils do
|> Formatter.linkify(options)
end
def make_report_content_text(nil), do: {:ok, nil}
def make_report_content_text(comment) do
max_size = Config.get([:instance, :max_report_comment_size], 1000)
if String.length(comment) <= max_size do
{:ok, Formatter.html_escape(comment, "text/plain")}
else
{:error, "Comment must be up to #{max_size} characters"}
end
end
@doc """
Use the data-media-id attributes to extract media from body text
"""