diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-03-21 21:09:20 +0100 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-03-21 21:09:20 +0100 |
commit | 2db28df4cffa2ef43a84ac68caee6cef24cce19b (patch) | |
tree | 1ea577fe24c3c3a6a8140409401ea367baf1edee /lib/pleroma/web/router.ex | |
parent | b9d0e34506ed759dfe096242a62078940dc1a8bb (diff) | |
download | pleroma-2db28df4cffa2ef43a84ac68caee6cef24cce19b.tar.gz |
Add public timeline TwAPI.
Diffstat (limited to 'lib/pleroma/web/router.ex')
-rw-r--r-- | lib/pleroma/web/router.ex | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 1e865b358..0440af8c1 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -9,12 +9,19 @@ defmodule Pleroma.Web.Router do pipeline :api do plug :accepts, ["json"] + plug :fetch_session + plug Pleroma.Plugs.AuthenticationPlug, %{fetcher: &Pleroma.Web.Router.user_fetcher/1, optional: true} end pipeline :authenticated_api do plug :accepts, ["json"] plug :fetch_session - plug Pleroma.Plugs.AuthenticationPlug, fetcher: &Pleroma.Web.Router.user_fetcher/1 + plug Pleroma.Plugs.AuthenticationPlug, %{fetcher: &Pleroma.Web.Router.user_fetcher/1} + end + + scope "/api", Pleroma.Web do + pipe_through :api + get "/statuses/public_timeline.json", TwitterAPI.Controller, :public_timeline end scope "/api", Pleroma.Web do |