New API method: /api/v1/search
Returns accounts, statuses, hashtags arrays
This commit is contained in:
9
app/controllers/api/v1/search_controller.rb
Normal file
9
app/controllers/api/v1/search_controller.rb
Normal file
@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::SearchController < ApiController
|
||||
respond_to :json
|
||||
|
||||
def index
|
||||
@search = OpenStruct.new(SearchService.new.call(params[:q], 5, params[:resolve] == 'true', current_account))
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user