|
|
@ -39,19 +39,6 @@ defmodule Pleroma.Web.Router do
|
|
|
|
post "/token", OAuthController, :token_exchange
|
|
|
|
post "/token", OAuthController, :token_exchange
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
scope "/api/v1", Pleroma.Web.MastodonAPI do
|
|
|
|
|
|
|
|
pipe_through :api
|
|
|
|
|
|
|
|
get "/instance", MastodonAPIController, :masto_instance
|
|
|
|
|
|
|
|
post "/apps", MastodonAPIController, :create_app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get "/timelines/public", MastodonAPIController, :public_timeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get "/statuses/:id", MastodonAPIController, :get_status
|
|
|
|
|
|
|
|
get "/statuses/:id/context", MastodonAPIController, :get_context
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get "/accounts/:id/statuses", MastodonAPIController, :user_statuses
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scope "/api/v1", Pleroma.Web.MastodonAPI do
|
|
|
|
scope "/api/v1", Pleroma.Web.MastodonAPI do
|
|
|
|
pipe_through :authenticated_api
|
|
|
|
pipe_through :authenticated_api
|
|
|
|
|
|
|
|
|
|
|
@ -70,6 +57,20 @@ defmodule Pleroma.Web.Router do
|
|
|
|
get "/notifications", MastodonAPIController, :notifications
|
|
|
|
get "/notifications", MastodonAPIController, :notifications
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scope "/api/v1", Pleroma.Web.MastodonAPI do
|
|
|
|
|
|
|
|
pipe_through :api
|
|
|
|
|
|
|
|
get "/instance", MastodonAPIController, :masto_instance
|
|
|
|
|
|
|
|
post "/apps", MastodonAPIController, :create_app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get "/timelines/public", MastodonAPIController, :public_timeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get "/statuses/:id", MastodonAPIController, :get_status
|
|
|
|
|
|
|
|
get "/statuses/:id/context", MastodonAPIController, :get_context
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get "/accounts/:id/statuses", MastodonAPIController, :user_statuses
|
|
|
|
|
|
|
|
get "/accounts/:id", MastodonAPIController, :user
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
scope "/api", Pleroma.Web do
|
|
|
|
scope "/api", Pleroma.Web do
|
|
|
|
pipe_through :config
|
|
|
|
pipe_through :config
|
|
|
|
|
|
|
|
|
|
|
|