about summary refs log tree commit diff
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-04-14 01:24:45 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:21 -0500
commitf344170fd0624987181aa4470b2a8ae9add8f27e (patch)
tree1e58e51714e5fe81540e55b0b18e45cc0c87a4f7
parent6c7f1691eef8f2cfe299373560966bfac6219056 (diff)
Raise max search result limit to 66 in API.
-rw-r--r--app/controllers/api/v1/search_controller.rb2
-rw-r--r--app/models/status.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/v1/search_controller.rb b/app/controllers/api/v1/search_controller.rb
index 194e7c810..37b45221b 100644
--- a/app/controllers/api/v1/search_controller.rb
+++ b/app/controllers/api/v1/search_controller.rb
@@ -3,7 +3,7 @@
 class Api::V1::SearchController < Api::BaseController
   include Authorization
 
-  RESULTS_LIMIT = 33
+  RESULTS_LIMIT = 66
 
   before_action -> { doorkeeper_authorize! :read, :'read:search' }
   before_action :require_user!
diff --git a/app/models/status.rb b/app/models/status.rb
index 5410c3098..506dca39a 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -298,7 +298,7 @@ class Status < ApplicationRecord
   after_find :limit_domain_visibility
 
   class << self
-    def search_for(term, limit = 33, account = nil)
+    def search_for(term, limit = 66, account = nil)
       pattern = sanitize_sql_like(term)
       pattern = "#{pattern}"
       scope = Status.where("tsv @@ plainto_tsquery('english', ?)", pattern)