X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/558c8765f546d7f13c2417275ccae847247a9d95..e3bac9e6e5210d0fd87b03c8ec6a55db6000c9cd:/app/controllers/api/changeset_comments_controller.rb diff --git a/app/controllers/api/changeset_comments_controller.rb b/app/controllers/api/changeset_comments_controller.rb index 756e56dcc..e8d3f4c3a 100644 --- a/app/controllers/api/changeset_comments_controller.rb +++ b/app/controllers/api/changeset_comments_controller.rb @@ -105,7 +105,7 @@ module Api ## # Check if the current user has exceed the rate limit for comments def rate_limit_exceeded? - recent_comments = current_user.changeset_comments.where("created_at >= ?", Time.now.utc - 1.hour).count + recent_comments = current_user.changeset_comments.where(:created_at => Time.now.utc - 1.hour..).count recent_comments >= current_user.max_changeset_comments_per_hour end