mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-23 00:14:48 +00:00
Fix a credo issue
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
2b3d1d7f79
commit
b94bf2ad87
1 changed files with 4 additions and 3 deletions
|
@ -196,9 +196,10 @@ defmodule Mobilizon.GraphQL.Resolvers.Resource do
|
|||
}
|
||||
} = _resolution
|
||||
) do
|
||||
with {:ok, data} when is_map(data) <- Parser.parse(resource_url) do
|
||||
{:ok, struct(Metadata, data)}
|
||||
else
|
||||
case Parser.parse(resource_url) do
|
||||
{:ok, data} when is_map(data) ->
|
||||
{:ok, struct(Metadata, data)}
|
||||
|
||||
{:error, _err} ->
|
||||
Logger.warn("Error while fetching preview from #{inspect(resource_url)}")
|
||||
{:error, :unknown_resource}
|
||||
|
|
Loading…
Reference in a new issue