Allow users to view their own rate limits with /rate_limits.json. Note that rate limits are only updated after every API call, so this page only shows the state of the limits after the last call, not the current state.
9 lines
246 B
Ruby
9 lines
246 B
Ruby
class RateLimitsController < ApplicationController
|
|
respond_to :html, :json, :xml
|
|
|
|
def index
|
|
@rate_limits = authorize RateLimit.visible(CurrentUser.user).paginated_search(params, count_pages: true)
|
|
respond_with(@rate_limits)
|
|
end
|
|
end
|