refactor: address review comments for join view
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/promote/production Build is passing

This commit is contained in:
Simon 2026-03-10 22:54:41 +01:00
parent f1d0526209
commit 021b709e6a
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
12 changed files with 113 additions and 31 deletions

View file

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