refactor: address review comments for join view
This commit is contained in:
parent
f1d0526209
commit
021b709e6a
12 changed files with 113 additions and 31 deletions
|
|
@ -15,6 +15,7 @@ defmodule MvWeb.JoinRateLimit do
|
|||
- `{:deny, _retry_after_ms}` - rate limit exceeded
|
||||
"""
|
||||
def check(key) when is_binary(key) do
|
||||
# Read at runtime so config can be changed without restart (e.g. in tests).
|
||||
config = Application.get_env(:mv, :join_rate_limit, [])
|
||||
scale_ms = Keyword.get(config, :scale_ms, 60_000)
|
||||
limit = Keyword.get(config, :limit, 10)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue