Apply suggestion to lib/pleroma/plugs/oauth_scopes_plug.ex

This commit is contained in:
Ivan Tashkinov 2019-09-18 10:31:10 +00:00
parent 847c7f02f5
commit e4f3d7f69d

View File

@ -61,9 +61,10 @@ defmodule Pleroma.Plugs.OAuthScopesPlug do
end end
defp maybe_perform_instance_privacy_check(%Plug.Conn{} = conn, options) do defp maybe_perform_instance_privacy_check(%Plug.Conn{} = conn, options) do
case options[:skip_instance_privacy_check] do if options[:skip_instance_privacy_check] do
true -> conn conn
_ -> EnsurePublicOrAuthenticatedPlug.call(conn, []) else
EnsurePublicOrAuthenticatedPlug.call(conn, [])
end end
end end
end end