IdempotencyPlug module name

This commit is contained in:
Alexander Strizhakov 2020-06-24 10:09:39 +03:00
parent 8dfaa54ffc
commit 5cd7030076
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
3 changed files with 5 additions and 5 deletions

View file

@ -2,7 +2,7 @@
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/> # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only # SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Plugs.IdempotencyPlug do defmodule Pleroma.Web.Plugs.IdempotencyPlug do
import Phoenix.Controller, only: [json: 2] import Phoenix.Controller, only: [json: 2]
import Plug.Conn import Plug.Conn

View file

@ -50,7 +50,7 @@ defmodule Pleroma.Web.Router do
plug(:expect_public_instance_or_authentication) plug(:expect_public_instance_or_authentication)
plug(:base_api) plug(:base_api)
plug(:after_auth) plug(:after_auth)
plug(Pleroma.Plugs.IdempotencyPlug) plug(Pleroma.Web.Plugs.IdempotencyPlug)
end end
pipeline :authenticated_api do pipeline :authenticated_api do
@ -58,7 +58,7 @@ defmodule Pleroma.Web.Router do
plug(:base_api) plug(:base_api)
plug(:after_auth) plug(:after_auth)
plug(Pleroma.Plugs.EnsureAuthenticatedPlug) plug(Pleroma.Plugs.EnsureAuthenticatedPlug)
plug(Pleroma.Plugs.IdempotencyPlug) plug(Pleroma.Web.Plugs.IdempotencyPlug)
end end
pipeline :admin_api do pipeline :admin_api do
@ -68,7 +68,7 @@ defmodule Pleroma.Web.Router do
plug(:after_auth) plug(:after_auth)
plug(Pleroma.Plugs.EnsureAuthenticatedPlug) plug(Pleroma.Plugs.EnsureAuthenticatedPlug)
plug(Pleroma.Web.Plugs.UserIsAdminPlug) plug(Pleroma.Web.Plugs.UserIsAdminPlug)
plug(Pleroma.Plugs.IdempotencyPlug) plug(Pleroma.Web.Plugs.IdempotencyPlug)
end end
pipeline :mastodon_html do pipeline :mastodon_html do

View file

@ -6,7 +6,7 @@ defmodule Pleroma.Web.Plugs.IdempotencyPlugTest do
use ExUnit.Case, async: true use ExUnit.Case, async: true
use Plug.Test use Plug.Test
alias Pleroma.Plugs.IdempotencyPlug alias Pleroma.Web.Plugs.IdempotencyPlug
alias Plug.Conn alias Plug.Conn
test "returns result from cache" do test "returns result from cache" do