Refactoring of :if_func / :unless_func plug options (general availability). Added tests for Pleroma.Web.Plug.
This commit is contained in:
parent
4c4344b7b1
commit
2c4844237f
9 changed files with 109 additions and 24 deletions
|
|
@ -27,7 +27,7 @@ defmodule Pleroma.Web.Feed.UserController do
|
|||
when format in ["json", "activity+json"] do
|
||||
with %{halted: false} = conn <-
|
||||
Pleroma.Plugs.EnsureAuthenticatedPlug.call(conn,
|
||||
unless_func: &Pleroma.Web.FederatingPlug.federating?/0
|
||||
unless_func: &Pleroma.Web.FederatingPlug.federating?/1
|
||||
) do
|
||||
ActivityPubController.call(conn, :user)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue