From: Mark Felder Date: Tue, 13 Oct 2020 15:08:38 +0000 (-0500) Subject: Merge branch 'develop' into feature/gen-magic X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=b738f709532ff18845f5d8cc3888d0bd67f750ab;p=akkoma Merge branch 'develop' into feature/gen-magic --- b738f709532ff18845f5d8cc3888d0bd67f750ab diff --cc lib/pleroma/web/activity_pub/activity_pub_controller.ex index 27bf6347d,6bf7421bb..570bcc7e7 --- a/lib/pleroma/web/activity_pub/activity_pub_controller.ex +++ b/lib/pleroma/web/activity_pub/activity_pub_controller.ex @@@ -45,10 -45,8 +45,10 @@@ defmodule Pleroma.Web.ActivityPub.Activ when action in [:read_inbox, :update_outbox, :whoami, :upload_media] ) + plug(Majic.Plug, [pool: Pleroma.MajicPool] when action in [:upload_media]) + plug( - Pleroma.Plugs.Cache, + Pleroma.Web.Plugs.Cache, [query_params: false, tracking_fun: &__MODULE__.track_object_fetch/2] when action in [:activity, :object] ) diff --cc lib/pleroma/web/mastodon_api/controllers/media_controller.ex index 09acea7f4,9586b14bc..161193134 --- a/lib/pleroma/web/mastodon_api/controllers/media_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/media_controller.ex @@@ -6,12 -6,11 +6,12 @@@ defmodule Pleroma.Web.MastodonAPI.Media use Pleroma.Web, :controller alias Pleroma.Object - alias Pleroma.Plugs.OAuthScopesPlug alias Pleroma.User alias Pleroma.Web.ActivityPub.ActivityPub + alias Pleroma.Web.Plugs.OAuthScopesPlug action_fallback(Pleroma.Web.MastodonAPI.FallbackController) + plug(Majic.Plug, [pool: Pleroma.MajicPool] when action in [:create, :create2]) plug(Pleroma.Web.ApiSpec.CastAndValidate) plug(:put_view, Pleroma.Web.MastodonAPI.StatusView) diff --cc lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex index 7e2f6c328,0f6f0b9db..15210f1e6 --- a/lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex +++ b/lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex @@@ -5,11 -5,10 +5,11 @@@ 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)