diff --git a/lib/philomena_web/plugs/not_authorized_plug.ex b/lib/philomena_web/plugs/not_authorized_plug.ex index 42da7ca4..d0a99b4e 100644 --- a/lib/philomena_web/plugs/not_authorized_plug.ex +++ b/lib/philomena_web/plugs/not_authorized_plug.ex @@ -7,8 +7,9 @@ defmodule PhilomenaWeb.NotAuthorizedPlug do def call(conn), do: call(conn, nil) def call(conn, _opts) do conn + |> Controller.fetch_flash() |> Controller.put_flash(:error, "You can't access that page.") |> Controller.redirect(external: conn.assigns.referrer) |> Conn.halt() end -end \ No newline at end of file +end diff --git a/lib/philomena_web/plugs/not_found_plug.ex b/lib/philomena_web/plugs/not_found_plug.ex index 2f782b21..364dc627 100644 --- a/lib/philomena_web/plugs/not_found_plug.ex +++ b/lib/philomena_web/plugs/not_found_plug.ex @@ -7,8 +7,9 @@ defmodule PhilomenaWeb.NotFoundPlug do def call(conn), do: call(conn, nil) def call(conn, _opts) do conn + |> Controller.fetch_flash() |> Controller.put_flash(:error, "Couldn't find what you were looking for!") |> Controller.redirect(external: conn.assigns.referrer) |> Conn.halt() end -end \ No newline at end of file +end