class Api::V1::BaseController < ApplicationController
  MAX_RESULTS_PER_PAGE = 1000
  WillPaginate.per_page = 100
  before_action :set_max_per_page

  private
  
  def set_max_per_page
    params[:per_page] = MAX_RESULTS_PER_PAGE if params[:per_page] && params[:per_page].to_i > MAX_RESULTS_PER_PAGE
  end
end
