mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 12:53:44 +08:00
b9a310f4b1
than passing params everywhere. Also make the private API private.
14 lines
288 B
Ruby
14 lines
288 B
Ruby
require_dependency 'search'
|
|
|
|
class SearchController < ApplicationController
|
|
|
|
def query
|
|
search = Search.new(params[:term],
|
|
guardian: guardian,
|
|
type_filter: params[:type_filter])
|
|
|
|
render_json_dump(search.execute.as_json)
|
|
end
|
|
|
|
end
|