Refactor skipped plugs into Pleroma.Web functions
Speeds up recompilation by reducing compile cycles
This commit is contained in:
parent
d896e45faf
commit
45b7325b9e
13 changed files with 22 additions and 57 deletions
|
|
@ -62,6 +62,14 @@ defmodule Pleroma.Web do
|
|||
)
|
||||
end
|
||||
|
||||
defp skip_auth(conn, _) do
|
||||
skip_plug(conn, [OAuthScopesPlug, EnsurePublicOrAuthenticatedPlug])
|
||||
end
|
||||
|
||||
defp skip_public_check(conn, _) do
|
||||
skip_plug(conn, EnsurePublicOrAuthenticatedPlug)
|
||||
end
|
||||
|
||||
# Executed just before actual controller action, invokes before-action hooks (callbacks)
|
||||
defp action(conn, params) do
|
||||
with %{halted: false} = conn <-
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue