Fix credo style reports following it's update

Mainly transform `with` into `case`

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-07-23 18:06:22 +02:00
parent 1cd511f440
commit c3cca5d613
26 changed files with 303 additions and 248 deletions

View File

@@ -94,7 +94,9 @@ defmodule MobilizonWeb.Upload do
{:same_host, true} <- {:same_host, host == MobilizonWeb.Endpoint.host()} do
MobilizonWeb.Uploaders.Uploader.remove_file(opts.uploader, path)
else
%URI{} = _uri -> {:error, "URL doesn't match pattern"}
%URI{} = _uri ->
{:error, "URL doesn't match pattern"}
{:same_host, _} ->
Logger.error("Media can't be deleted because its URL doesn't match current host")
end