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

This commit is contained in:
Ivan Tashkinov 2020-02-28 13:33:42 +00:00
parent 6f2efb1c45
commit 3759b146c4

View file

@ -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)