From aa9570d4f391fc65b3d0fd8eabe4e8574a8de0fa Mon Sep 17 00:00:00 2001 From: p31729568 Date: Mon, 21 Oct 2019 15:58:29 +0800 Subject: [PATCH] move hot keyword api out weapp --- app/controllers/{weapps => }/hot_keywords_controller.rb | 2 +- config/routes.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) rename app/controllers/{weapps => }/hot_keywords_controller.rb (68%) diff --git a/app/controllers/weapps/hot_keywords_controller.rb b/app/controllers/hot_keywords_controller.rb similarity index 68% rename from app/controllers/weapps/hot_keywords_controller.rb rename to app/controllers/hot_keywords_controller.rb index f915d9c47..e0c536e42 100644 --- a/app/controllers/weapps/hot_keywords_controller.rb +++ b/app/controllers/hot_keywords_controller.rb @@ -1,4 +1,4 @@ -class Weapps::HotKeywordsController < Weapps::BaseController +class HotKeywordsController < ApplicationController def index keywords = [] keywords = HotSearchKeyword.hot(8) if HotSearchKeyword.available? diff --git a/config/routes.rb b/config/routes.rb index 17fb5dde3..f0c290096 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -846,6 +846,8 @@ Rails.application.routes.draw do get '/auth/wechat/callback', to: 'oauth/wechat#create' resource :bind_user, only: [:create] + resources :hot_keywords, only: [:index] + namespace :weapps do resource :home, only: [:show] resource :session, only: [:create] @@ -854,7 +856,6 @@ Rails.application.routes.draw do resource :verify, only: [:create] resources :searchs, only: [:index] - resources :hot_keywords, only: [:index] end end