diff options
Diffstat (limited to 'app/controllers/admin/tools_controller.rb')
| -rw-r--r-- | app/controllers/admin/tools_controller.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/controllers/admin/tools_controller.rb b/app/controllers/admin/tools_controller.rb new file mode 100644 index 00000000..0bae31ad --- /dev/null +++ b/app/controllers/admin/tools_controller.rb @@ -0,0 +1,15 @@ +module Admin + class ToolsController < AdminController + def index + @tools = search_for_tools(params[:q]) + end + + private + + def search_for_tools(query) + return [] if query.blank? + client = ASIN::Client.instance + client.search(Keywords: query, SearchIndex: :Kitchen, Sort: :salesrank) + end + end +end |
