add search env to controller file

Add variable to controller file for search results
staging
Lumb 2019-06-20 09:43:14 +00:00 committed by Gitea
parent 5a93e171db
commit b052644d2e
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
class Api::V1::SearchController < Api::BaseController
include Authorization
RESULTS_LIMIT = 100
RESULTS_LIMIT = (ENV['MAX_SEARCH_RESULTS'] || 100).to_i
before_action -> { doorkeeper_authorize! :read, :'read:search' }
before_action :require_user!