mirror of
https://github.com/valitydev/limiter.git
synced 2024-11-06 00:55:22 +00:00
fix (#6)
This commit is contained in:
parent
886acc0503
commit
c7e96068a5
@ -52,7 +52,7 @@ get_limit(LimitID, Config, LimitContext) ->
|
|||||||
LimitRangeID = construct_range_id(LimitID, Timestamp, Config, LimitContext),
|
LimitRangeID = construct_range_id(LimitID, Timestamp, Config, LimitContext),
|
||||||
LimitRange = unwrap(limit, lim_range_machine:get(LimitRangeID, LimitContext)),
|
LimitRange = unwrap(limit, lim_range_machine:get(LimitRangeID, LimitContext)),
|
||||||
TimeRange = lim_config_machine:calculate_time_range(Timestamp, Config),
|
TimeRange = lim_config_machine:calculate_time_range(Timestamp, Config),
|
||||||
#{own_amount := Amount} =
|
#{max_available_amount := Amount} =
|
||||||
unwrap(lim_range_machine:get_range_balance(TimeRange, LimitRange, LimitContext)),
|
unwrap(lim_range_machine:get_range_balance(TimeRange, LimitRange, LimitContext)),
|
||||||
#limiter_Limit{
|
#limiter_Limit{
|
||||||
id = LimitRangeID,
|
id = LimitRangeID,
|
||||||
|
Loading…
Reference in New Issue
Block a user