X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fmastodon_api%2Fcontrollers%2Fsubscription_controller.ex;h=11df6fc4a24a8ef92b983bfdcfd672ff8edb2af1;hb=fd932b14a7e7335a91a2acc2d6dd6fba7e2e90b3;hp=e2b17aab1ebd7e7bc894bc65f0d6a11f4203ad08;hpb=f017260cdc90d37c1878d7f2f29263dca017ebeb;p=akkoma
diff --git a/lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex b/lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex
index e2b17aab1..11df6fc4a 100644
--- a/lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex
+++ b/lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex
@@ -1,17 +1,21 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.SubscriptionController do
@moduledoc "The module represents functions to manage user subscriptions."
use Pleroma.Web, :controller
+ alias Pleroma.Web.MastodonAPI.PushSubscriptionView, as: View
alias Pleroma.Web.Push
alias Pleroma.Web.Push.Subscription
- alias Pleroma.Web.MastodonAPI.PushSubscriptionView, as: View
action_fallback(:errors)
+ plug(Pleroma.Plugs.OAuthScopesPlug, %{scopes: ["push"]})
+
+ plug(Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug)
+
# Creates PushSubscription
# POST /api/v1/push/subscription
#