Fix new credo warnings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-11-26 14:30:46 +01:00
parent 52e624bb88
commit 51afec1856
20 changed files with 77 additions and 72 deletions

View File

@@ -15,7 +15,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Media do
See Mobilizon.Web.Resolvers.Event.create_event/3
"""
def media(%{picture_id: media_id} = _parent, _args, _resolution) do
with {:ok, media} <- do_fetch_media(media_id), do: {:ok, media}
do_fetch_media(media_id)
end
def media(%{picture: media} = _parent, _args, _resolution), do: {:ok, media}

View File

@@ -559,11 +559,9 @@ defmodule Mobilizon.GraphQL.Resolvers.User do
Enum.each(actors, fn actor ->
actor_performing = Keyword.get(options, :actor_performing, actor)
Actions.Delete.delete(actor, actor_performing, true)
end),
# Delete user
{:ok, user} <-
Users.delete_user(user, reserve_email: Keyword.get(options, :reserve_email, activated)) do
{:ok, user}
end) do
# Delete user
Users.delete_user(user, reserve_email: Keyword.get(options, :reserve_email, activated))
end
end