diff --git a/lib/inertia_phoenix/plug.ex b/lib/inertia_phoenix/plug.ex index ef3b3ab..f0c97f2 100644 --- a/lib/inertia_phoenix/plug.ex +++ b/lib/inertia_phoenix/plug.ex @@ -46,7 +46,7 @@ defmodule InertiaPhoenix.Plug do |> put_resp_header("x-inertia", "true") |> put_resp_header("x-inertia-location", request_url(conn)) |> put_resp_content_type("text/html") - |> put_status(:conflict) + |> send_resp(:conflict, "") |> halt() end diff --git a/test/inertia_phoenix/controller_test.exs b/test/inertia_phoenix/controller_test.exs index 93c4fc1..78d206b 100644 --- a/test/inertia_phoenix/controller_test.exs +++ b/test/inertia_phoenix/controller_test.exs @@ -86,7 +86,6 @@ defmodule InertiaPhoenix.ControllerTest do |> fetch_session |> fetch_flash |> InertiaPhoenix.Plug.call([]) - |> InertiaPhoenix.Controller.render_inertia("Home", props: %{hello: "world"}) assert html = html_response(conn, 409) end