From: Phil Hagelberg Date: Mon, 28 Oct 2019 00:53:20 +0000 (-0700) Subject: Don't show 404 in static-fe controller unless it's actually not found. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=e79d8985ab90bcad33d9ff13c6a16f006c6abac9;p=akkoma Don't show 404 in static-fe controller unless it's actually not found. --- diff --git a/lib/pleroma/web/static_fe/static_fe_controller.ex b/lib/pleroma/web/static_fe/static_fe_controller.ex index 78cd325c8..8bbd06aa9 100644 --- a/lib/pleroma/web/static_fe/static_fe_controller.ex +++ b/lib/pleroma/web/static_fe/static_fe_controller.ex @@ -18,7 +18,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do |> put_view(Pleroma.Web.StaticFE.StaticFEView) |> render("notice.html", %{data: data}) else - _ -> + {:error, nil} -> conn |> put_status(404) |> text("Not found") @@ -33,7 +33,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do |> put_view(Pleroma.Web.StaticFE.StaticFEView) |> render("profile.html", %{data: data}) else - _ -> + {:error, nil} -> conn |> put_status(404) |> text("Not found")