mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 16:42:46 +08:00
Revert "FIX: Require q param in /tags/filter/search route (#8263)"
This reverts commit 968a1419df
.
This commit is contained in:
parent
968a1419df
commit
92213813d4
|
@ -193,8 +193,6 @@ class TagsController < ::ApplicationController
|
|||
end
|
||||
|
||||
def search
|
||||
params.require(:q)
|
||||
|
||||
clean_name = DiscourseTagging.clean_tag(params[:q])
|
||||
category = params[:categoryId] ? Category.find_by_id(params[:categoryId]) : nil
|
||||
|
||||
|
|
|
@ -428,15 +428,6 @@ describe TagsController do
|
|||
json = ::JSON.parse(response.body)
|
||||
expect(json["results"].map { |j| j["id"] }).to eq(['тема-в-разработке'])
|
||||
end
|
||||
|
||||
context 'when tag query parameter is not provided' do
|
||||
it 'does not cause a 500 error, returns a param required message' do
|
||||
get "/tags/filter/search.json", params: {}
|
||||
expect(response.status).to eq(400)
|
||||
json = ::JSON.parse(response.body)
|
||||
expect(json['errors']).to include('param is missing or the value is empty: q')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user