fixes #2822: Post vote API: returns 200 for both success and failure; fixes bug with x-api-limit header
This commit is contained in:
@@ -47,7 +47,7 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
throttled = CurrentUser.user.token_bucket.throttled?
|
||||
headers["X-Api-Limit"] = CurrentUser.user.token_bucket.token_count
|
||||
headers["X-Api-Limit"] = CurrentUser.user.token_bucket.token_count.to_s
|
||||
|
||||
if throttled
|
||||
respond_to do |format|
|
||||
|
||||
Reference in New Issue
Block a user