Merge branch 'develop' into refactor/discoverable_user_field
[akkoma] / lib / pleroma / web / mastodon_api / controllers / mastodon_api_controller.ex
index ac8c18f24272892d387406aa30d3d8f24cd87a3d..9cf682c7b8a5dd163b35701ef805c2c8d927fffd 100644 (file)
@@ -15,9 +15,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
 
   require Logger
 
-  plug(:skip_plug, Pleroma.Plugs.OAuthScopesPlug when action in [:empty_array, :empty_object])
-
-  plug(Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug)
+  plug(
+    :skip_plug,
+    [Pleroma.Web.Plugs.OAuthScopesPlug, Pleroma.Web.Plugs.EnsurePublicOrAuthenticatedPlug]
+    when action in [:empty_array, :empty_object]
+  )
 
   action_fallback(Pleroma.Web.MastodonAPI.FallbackController)