X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Frouter.ex;h=05d1e54b56a812d297484d9f2f3fe891fbf7400d;hb=b0363e80556b4c8271ab69d2680166ca844f660c;hp=d3cae62011e26da62dcce91f9e5a00ce873c60c8;hpb=4dc517a0bb979793c1c2590d38efe853c68eb80c;p=akkoma diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index d3cae6201..05d1e54b5 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -39,6 +39,26 @@ defmodule Pleroma.Web.Router do post "/token", OAuthController, :token_exchange end + scope "/api/v1", Pleroma.Web.MastodonAPI do + pipe_through :authenticated_api + + get "/accounts/verify_credentials", MastodonAPIController, :verify_credentials + get "/accounts/relationships", MastodonAPIController, :relationships + + get "/timelines/home", MastodonAPIController, :home_timeline + + post "/statuses", MastodonAPIController, :post_status + delete "/statuses/:id", MastodonAPIController, :delete_status + + post "/statuses/:id/reblog", MastodonAPIController, :reblog_status + post "/statuses/:id/favourite", MastodonAPIController, :fav_status + post "/statuses/:id/unfavourite", MastodonAPIController, :unfav_status + + get "/notifications", MastodonAPIController, :notifications + + post "/media", MastodonAPIController, :upload + end + scope "/api/v1", Pleroma.Web.MastodonAPI do pipe_through :api get "/instance", MastodonAPIController, :masto_instance @@ -47,16 +67,12 @@ defmodule Pleroma.Web.Router do get "/timelines/public", MastodonAPIController, :public_timeline get "/statuses/:id", MastodonAPIController, :get_status - end - - scope "/api/v1", Pleroma.Web.MastodonAPI do - pipe_through :authenticated_api + get "/statuses/:id/context", MastodonAPIController, :get_context + get "/statuses/:id/favourited_by", MastodonAPIController, :favourited_by + get "/statuses/:id/reblogged_by", MastodonAPIController, :reblogged_by - get "/accounts/verify_credentials", MastodonAPIController, :verify_credentials - get "/timelines/home", MastodonAPIController, :home_timeline - - post "/statuses", MastodonAPIController, :post_status - delete "/statuses/:id", MastodonAPIController, :delete_status + get "/accounts/:id/statuses", MastodonAPIController, :user_statuses + get "/accounts/:id", MastodonAPIController, :user end scope "/api", Pleroma.Web do