diff --git a/app/assets/javascripts/discourse/lib/search-for-term.js.es6 b/app/assets/javascripts/discourse/lib/search-for-term.js.es6 index f3d86b306aa..12e05eb739e 100644 --- a/app/assets/javascripts/discourse/lib/search-for-term.js.es6 +++ b/app/assets/javascripts/discourse/lib/search-for-term.js.es6 @@ -15,7 +15,7 @@ function searchForTerm(term, opts) { }; } - return Discourse.ajax('/search/', { data: data, method: 'POST' }).then(function(results){ + return Discourse.ajax('/search/query', { data: data }).then(function(results){ // Topics might not be included if (!results.topics) { results.topics = []; } if (!results.users) { results.users = []; } diff --git a/config/routes.rb b/config/routes.rb index 4a55c3059b5..e46d73fb5b2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -387,7 +387,7 @@ Discourse::Application.routes.draw do get "category/*path" => "categories#redirect" get "top" => "list#top" - post "search" => "search#query" + get "search/query" => "search#query" # Topics resource get "t/:id" => "topics#show"