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

@@ -15,7 +15,7 @@ defmodule MobilizonWeb.ActivityPubController do
action_fallback(:errors)
def following(conn, %{"name" => name, "page" => page}) do
with {page, ""} = Integer.parse(page),
with {page, ""} <- Integer.parse(page),
%Actor{} = actor <- Actors.get_local_actor_by_name_with_everything(name) do
conn
|> put_resp_header("content-type", "application/activity+json")
@@ -32,7 +32,7 @@ defmodule MobilizonWeb.ActivityPubController do
end
def followers(conn, %{"name" => name, "page" => page}) do
with {page, ""} = Integer.parse(page),
with {page, ""} <- Integer.parse(page),
%Actor{} = actor <- Actors.get_local_actor_by_name_with_everything(name) do
conn
|> put_resp_header("content-type", "application/activity+json")
@@ -49,7 +49,7 @@ defmodule MobilizonWeb.ActivityPubController do
end
def outbox(conn, %{"name" => name, "page" => page}) do
with {page, ""} = Integer.parse(page),
with {page, ""} <- Integer.parse(page),
%Actor{} = actor <- Actors.get_local_actor_by_name(name) do
conn
|> put_resp_header("content-type", "application/activity+json")