]>
cat aescling's git repositories - mastodon.git/blob - app/controllers/api/v1/search_controller.rb
1 # frozen_string_literal: true
3 class Api
::V1::SearchController < Api
::BaseController
8 before_action
-> { doorkeeper_authorize!
:read, :'read:search' }
9 before_action
:require_user!
14 @search = Search
.new(search
)
15 render json
: @search, serializer
: REST
::SearchSerializer
21 search_results
.tap
do |search
|
22 search
[:statuses].keep_if
do |status
|
24 authorize status
, :show?
25 rescue Mastodon
::NotPermittedError
33 SearchService
.new
.call(
36 truthy_param
?(:resolve),
This page took 0.076017 seconds and 4 git commands to generate.