You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: iqdb_queries_controller.rb
    path of file: ./repos/e621ng/app/controllers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class IqdbQueriesController < ApplicationController
  respond_to :html, :json
  # Show uses POST because it needs a file para
    
  def throttle(search_params)
    return if Danbooru.config.disable_throttles?

    if %i[file url post_id hash].any? { |key| search_params[key].present? }
      if RateLimiter.check_limit("img:#{CurrentUser.ip_addr}", 1, 2.seconds)
        raise APIThrottled
      else
        RateLimiter.hit("img:#{CurrentUser.ip_addr}", 2.seconds)
      end