Merge branch 'chores/bump-copyright' into 'develop'
[akkoma] / lib / pleroma / web / pleroma_api / controllers / mascot_controller.ex
index 4ba4154dd5e1b691b0329bcdeb68eda9cd028481..429ef51121d0bbcb826a10265b2148f4a99a4a05 100644 (file)
@@ -1,18 +1,18 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.PleromaAPI.MascotController do
   use Pleroma.Web, :controller
 
-  alias Pleroma.Plugs.OAuthScopesPlug
   alias Pleroma.User
   alias Pleroma.Web.ActivityPub.ActivityPub
+  alias Pleroma.Web.Plugs.OAuthScopesPlug
 
+  plug(Majic.Plug, [pool: Pleroma.MajicPool] when action in [:update])
   plug(Pleroma.Web.ApiSpec.CastAndValidate)
   plug(OAuthScopesPlug, %{scopes: ["read:accounts"]} when action == :show)
   plug(OAuthScopesPlug, %{scopes: ["write:accounts"]} when action != :show)
-  plug(Majic.Plug, [pool: Pleroma.MajicPool] when action in [:update])
 
   defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.PleromaMascotOperation