normalize 404s
This commit is contained in:
parent
eb5816c2f4
commit
4291f2d8fb
|
@ -170,7 +170,7 @@ defmodule Vonbraun.MyRouter do
|
||||||
conn = Plug.Conn.put_resp_content_type(conn, "application/activity+json")
|
conn = Plug.Conn.put_resp_content_type(conn, "application/activity+json")
|
||||||
send_resp(conn, 200, render_user(nickname, domain, name, summary, ""))
|
send_resp(conn, 200, render_user(nickname, domain, name, summary, ""))
|
||||||
else
|
else
|
||||||
send_resp(conn, 404, "not found")
|
send_resp(conn, 404, "fuck off")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ defmodule Vonbraun.MyRouter do
|
||||||
conn = Plug.Conn.put_resp_content_type(conn, "application/activity+json")
|
conn = Plug.Conn.put_resp_content_type(conn, "application/activity+json")
|
||||||
send_resp(conn, 200, render_following(nickname, domain))
|
send_resp(conn, 200, render_following(nickname, domain))
|
||||||
else
|
else
|
||||||
send_resp(conn, 404, "not found")
|
send_resp(conn, 404, "fuck off")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ defmodule Vonbraun.MyRouter do
|
||||||
conn = Plug.Conn.put_resp_content_type(conn, "application/activity+json")
|
conn = Plug.Conn.put_resp_content_type(conn, "application/activity+json")
|
||||||
send_resp(conn, 200, render_followers(nickname, domain))
|
send_resp(conn, 200, render_followers(nickname, domain))
|
||||||
else
|
else
|
||||||
send_resp(conn, 404, "not found")
|
send_resp(conn, 404, "fuck off")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -225,6 +225,6 @@ defmodule Vonbraun.MyRouter do
|
||||||
forward("/users/:user/inbox", to: InboxRouter)
|
forward("/users/:user/inbox", to: InboxRouter)
|
||||||
|
|
||||||
match _ do
|
match _ do
|
||||||
send_resp(conn, 404, "oops")
|
send_resp(conn, 404, "fuck off")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue