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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user