diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-06-08 19:14:12 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-06-08 19:15:04 -0500 |
commit | 45b7325b9ef8110b424df3541b321c9a220f886c (patch) | |
tree | 2dbd6e5a9ebbde8a0131d1674ceb5f2f31ef1cf8 /lib/pleroma/web/mastodon_api/controllers/app_controller.ex | |
parent | d896e45fafbdf3d1428eead9b9b9ce99668c16b3 (diff) | |
download | pleroma-45b7325b9ef8110b424df3541b321c9a220f886c.tar.gz |
Refactor skipped plugs into Pleroma.Web functions
Speeds up recompilation by reducing compile cycles
Diffstat (limited to 'lib/pleroma/web/mastodon_api/controllers/app_controller.ex')
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/app_controller.ex | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/app_controller.ex b/lib/pleroma/web/mastodon_api/controllers/app_controller.ex index dd3b39c77..a95cc52fd 100644 --- a/lib/pleroma/web/mastodon_api/controllers/app_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/app_controller.ex @@ -14,16 +14,10 @@ defmodule Pleroma.Web.MastodonAPI.AppController do alias Pleroma.Web.OAuth.App alias Pleroma.Web.OAuth.Scopes alias Pleroma.Web.OAuth.Token - alias Pleroma.Web.Plugs.EnsurePublicOrAuthenticatedPlug - alias Pleroma.Web.Plugs.OAuthScopesPlug action_fallback(Pleroma.Web.MastodonAPI.FallbackController) - plug( - :skip_plug, - [OAuthScopesPlug, EnsurePublicOrAuthenticatedPlug] - when action in [:create, :verify_credentials] - ) + plug(:skip_auth when action in [:create, :verify_credentials]) plug(Pleroma.Web.ApiSpec.CastAndValidate) |