Revert "Better error handling for user feeds."

This reverts commit 11714fbaa2.
This commit is contained in:
Roger Braun 2017-08-03 17:49:18 +02:00
parent 11714fbaa2
commit 27b8e3affb

View file

@ -8,13 +8,11 @@ defmodule Pleroma.Web.OStatus.OStatusController do
import Ecto.Query import Ecto.Query
def feed_redirect(conn, %{"nickname" => nickname}) do def feed_redirect(conn, %{"nickname" => nickname}) do
with %User{} = user <- User.get_cached_by_nickname(nickname) do user = User.get_cached_by_nickname(nickname)
case get_format(conn) do
"html" -> Fallback.RedirectController.redirector(conn, nil) case get_format(conn) do
_ -> redirect conn, external: OStatus.feed_path(user) "html" -> Fallback.RedirectController.redirector(conn, nil)
end _ -> redirect conn, external: OStatus.feed_path(user)
else
_e -> send_resp(conn, 404, "No user found")
end end
end end