From b3a3001e90f37048a6e528241d5962b7c53240d9 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 1 Mar 2019 12:57:39 +0100 Subject: [PATCH] Fix render/4 -> render/3 calls Signed-off-by: Thomas Citharel --- lib/mobilizon_web/controllers/fallback_controller.ex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/mobilizon_web/controllers/fallback_controller.ex b/lib/mobilizon_web/controllers/fallback_controller.ex index c36a23fc9..6817b9cb2 100644 --- a/lib/mobilizon_web/controllers/fallback_controller.ex +++ b/lib/mobilizon_web/controllers/fallback_controller.ex @@ -9,18 +9,21 @@ defmodule MobilizonWeb.FallbackController do def call(conn, {:error, %Ecto.Changeset{} = changeset}) do conn |> put_status(:unprocessable_entity) - |> render(MobilizonWeb.ChangesetView, "error.json", changeset: changeset) + |> put_view(MobilizonWeb.ChangesetView) + |> render("error.json", changeset: changeset) end def call(conn, {:error, nil}) do conn |> put_status(:unprocessable_entity) - |> render(MobilizonWeb.ErrorView, "invalid_request.json") + |> put_view(MobilizonWeb.ErrorView) + |> render("invalid_request.json") end def call(conn, {:error, :not_found}) do conn |> put_status(:not_found) - |> render(MobilizonWeb.ErrorView, :"404") + |> put_view(MobilizonWeb.ErrorView) + |> render(:"404") end end