FIX: view was getting rendered twice for rate limiting error
This commit is contained in:
parent
98d19616dd
commit
b014540fde
|
@ -75,7 +75,7 @@ class TopicsController < ApplicationController
|
||||||
begin
|
begin
|
||||||
RateLimiter.new(current_user, "print-topic-per-hour", SiteSetting.max_prints_per_hour_per_user, 1.hour).performed! unless @guardian.is_admin?
|
RateLimiter.new(current_user, "print-topic-per-hour", SiteSetting.max_prints_per_hour_per_user, 1.hour).performed! unless @guardian.is_admin?
|
||||||
rescue RateLimiter::LimitExceeded
|
rescue RateLimiter::LimitExceeded
|
||||||
render_json_error(I18n.t("rate_limiter.slow_down"))
|
return render_json_error I18n.t("rate_limiter.slow_down")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue