Fix tests for FeedController

And remove useless Fallbacks in Fallback controller

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-04-30 14:21:33 +02:00
parent 7c8f1a56af
commit e97be0b814
2 changed files with 6 additions and 29 deletions

View File

@@ -6,20 +6,6 @@ defmodule MobilizonWeb.FallbackController do
"""
use MobilizonWeb, :controller
def call(conn, {:error, %Ecto.Changeset{} = changeset}) do
conn
|> put_status(:unprocessable_entity)
|> put_view(MobilizonWeb.ChangesetView)
|> render("error.json", changeset: changeset)
end
def call(conn, {:error, nil}) do
conn
|> put_status(:unprocessable_entity)
|> put_view(MobilizonWeb.ErrorView)
|> render("invalid_request.json")
end
def call(conn, {:error, :not_found}) do
conn
|> put_status(:not_found)