Fix a credo issue
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
2b3d1d7f79
commit
b94bf2ad87
@ -196,9 +196,10 @@ defmodule Mobilizon.GraphQL.Resolvers.Resource do
|
||||
}
|
||||
} = _resolution
|
||||
) do
|
||||
with {:ok, data} when is_map(data) <- Parser.parse(resource_url) do
|
||||
case Parser.parse(resource_url) do
|
||||
{:ok, data} when is_map(data) ->
|
||||
{:ok, struct(Metadata, data)}
|
||||
else
|
||||
|
||||
{:error, _err} ->
|
||||
Logger.warn("Error while fetching preview from #{inspect(resource_url)}")
|
||||
{:error, :unknown_resource}
|
||||
|
Loading…
Reference in New Issue
Block a user