about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/v1/accounts_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb
index 5cc0817f6..9b02c9981 100644
--- a/app/controllers/api/v1/accounts_controller.rb
+++ b/app/controllers/api/v1/accounts_controller.rb
@@ -2,7 +2,7 @@ class Api::V1::AccountsController < ApiController
   before_action -> { doorkeeper_authorize! :read }, except: [:follow, :unfollow, :block, :unblock]
   before_action -> { doorkeeper_authorize! :follow }, only: [:follow, :unfollow, :block, :unblock]
   before_action :require_user!, except: [:show, :following, :followers, :statuses]
-  before_action :set_account, except: [:verify_credentials, :suggestions]
+  before_action :set_account, except: [:verify_credentials, :suggestions, :search]
 
   respond_to :json
 
@@ -91,6 +91,11 @@ class Api::V1::AccountsController < ApiController
     @blocking    = Account.blocking_map(ids, current_user.account_id)
   end
 
+  def search
+    @accounts = SearchService.new.call(params[:q], params[:resolve] == 'true')
+    render action: :index
+  end
+
   private
 
   def set_account