forked from AkkomaGang/akkoma
EnsureUserKeyPlug module name
This commit is contained in:
parent
d6cb1a3b46
commit
8e301a4c37
3 changed files with 4 additions and 4 deletions
|
@ -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.EnsureUserKeyPlug do
|
defmodule Pleroma.Web.Plugs.EnsureUserKeyPlug do
|
||||||
import Plug.Conn
|
import Plug.Conn
|
||||||
|
|
||||||
def init(opts) do
|
def init(opts) do
|
||||||
|
|
|
@ -36,7 +36,7 @@ defmodule Pleroma.Web.Router do
|
||||||
pipeline :after_auth do
|
pipeline :after_auth do
|
||||||
plug(Pleroma.Web.Plugs.UserEnabledPlug)
|
plug(Pleroma.Web.Plugs.UserEnabledPlug)
|
||||||
plug(Pleroma.Web.Plugs.SetUserSessionIdPlug)
|
plug(Pleroma.Web.Plugs.SetUserSessionIdPlug)
|
||||||
plug(Pleroma.Plugs.EnsureUserKeyPlug)
|
plug(Pleroma.Web.Plugs.EnsureUserKeyPlug)
|
||||||
end
|
end
|
||||||
|
|
||||||
pipeline :base_api do
|
pipeline :base_api do
|
||||||
|
@ -80,7 +80,7 @@ defmodule Pleroma.Web.Router do
|
||||||
pipeline :pleroma_html do
|
pipeline :pleroma_html do
|
||||||
plug(:browser)
|
plug(:browser)
|
||||||
plug(:authenticate)
|
plug(:authenticate)
|
||||||
plug(Pleroma.Plugs.EnsureUserKeyPlug)
|
plug(Pleroma.Web.Plugs.EnsureUserKeyPlug)
|
||||||
end
|
end
|
||||||
|
|
||||||
pipeline :well_known do
|
pipeline :well_known do
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
defmodule Pleroma.Web.Plugs.EnsureUserKeyPlugTest do
|
defmodule Pleroma.Web.Plugs.EnsureUserKeyPlugTest do
|
||||||
use Pleroma.Web.ConnCase, async: true
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Plugs.EnsureUserKeyPlug
|
alias Pleroma.Web.Plugs.EnsureUserKeyPlug
|
||||||
|
|
||||||
test "if the conn has a user key set, it does nothing", %{conn: conn} do
|
test "if the conn has a user key set, it does nothing", %{conn: conn} do
|
||||||
conn =
|
conn =
|
||||||
|
|
Loading…
Reference in a new issue