Apply suggestion to lib/pleroma/plugs/rate_limiter/rate_limiter.ex
This commit is contained in:
parent
6f2efb1c45
commit
3759b146c4
|
@ -144,7 +144,7 @@ def inspect_bucket(conn, bucket_name_root, plug_opts) do
|
|||
end
|
||||
|
||||
def action_settings(plug_opts) do
|
||||
with limiter_name when not is_nil(limiter_name) <- plug_opts[:name],
|
||||
with limiter_name when is_atom(limiter_name) <- plug_opts[:name],
|
||||
limits when not is_nil(limits) <- Config.get([:rate_limit, limiter_name]) do
|
||||
bucket_name_root = Keyword.get(plug_opts, :bucket_name, limiter_name)
|
||||
|
||||
|
|
Loading…
Reference in a new issue