[#468] Added support for push OAuth scope (Mastodon 2.4+).
This commit is contained in:
parent
6fe7acd58e
commit
b574d97c2e
3 changed files with 20 additions and 2 deletions
|
|
@ -93,6 +93,10 @@ defmodule Pleroma.Web.Router do
|
|||
plug(Pleroma.Plugs.OAuthScopesPlug, %{scopes: ["follow"]})
|
||||
end
|
||||
|
||||
pipeline :oauth_push do
|
||||
plug(Pleroma.Plugs.OAuthScopesPlug, %{scopes: ["push"]})
|
||||
end
|
||||
|
||||
pipeline :well_known do
|
||||
plug(:accepts, ["json", "jrd+json", "xml", "xrd+xml"])
|
||||
end
|
||||
|
|
@ -290,6 +294,10 @@ defmodule Pleroma.Web.Router do
|
|||
|
||||
post("/domain_blocks", MastodonAPIController, :block_domain)
|
||||
delete("/domain_blocks", MastodonAPIController, :unblock_domain)
|
||||
end
|
||||
|
||||
scope [] do
|
||||
pipe_through(:oauth_push)
|
||||
|
||||
post("/push/subscription", MastodonAPIController, :create_push_subscription)
|
||||
get("/push/subscription", MastodonAPIController, :get_push_subscription)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue