announcement-test/config/routes.rb

63 lines
3.2 KiB
Ruby
Raw Normal View History

2014-04-01 07:12:43 +00:00
Rails.application.routes.draw do
2021-08-13 04:42:14 +00:00
if ENV['worker_num']=='0' && File.basename($0) != 'rake' && !Rails.const_defined?('Console')
2021-12-05 02:58:25 +00:00
Bulletin
2021-12-18 04:48:50 +00:00
if BulletinFeedCache.count>BulletinFeed.count*5
BulletinFeedCache.collection.drop
end
2021-08-13 04:42:14 +00:00
Thread.new do
BulletinFeedCache.regenerate_all
end
end
2014-04-10 09:52:43 +00:00
locales = Site.first.in_use_locales rescue I18n.available_locales
2014-04-10 03:52:59 +00:00
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
2021-09-16 09:15:44 +00:00
namespace :admin do
get "announcement/get_all_anncs_without_subannc", to: "announcements#get_all_anncs_without_subannc"
2021-09-13 09:43:41 +00:00
post 'announcement/get_preview_action', to: 'announcements#get_preview_action'
2014-06-17 10:46:52 +00:00
post 'announcement/preview', to: 'announcements#preview'
2015-07-08 10:11:25 +00:00
post 'announcement/createfeed', to: 'announcements#createfeed'
2016-04-21 17:28:37 +00:00
post 'announcement/importanns', to: 'announcements#importanns'
post 'announcement/import_from_xml', to: 'announcements#import_from_xml'
2016-04-21 17:28:37 +00:00
get 'announcement/excel_format', to: 'announcements#excel_format'
2017-01-16 07:14:57 +00:00
get 'announcement/export_excel', to: 'announcements#export_excel'
2015-07-08 10:11:25 +00:00
patch 'announcement/updatefeed', to: 'announcements#updatefeed'
delete 'announcement/deletefeed', to: 'announcements#deletefeed'
2014-06-23 08:36:04 +00:00
get 'announcement/destroy_preview/:slug_title-:uid', to: 'announcements#destroy_preview'
post 'announcement/approve_bulletin', to: 'announcements#approve_bulletin'
2015-07-08 10:11:25 +00:00
get 'announcement/feed', to: 'announcements#feed'
get 'announcements/feedform', to: 'announcements#feedform'
get 'announcement/settings', to: 'announcements#settings'
2016-04-21 17:28:37 +00:00
get 'announcement/import', to: 'announcements#import'
post 'announcement/createsettings', to: 'announcements#createsettings'
patch 'announcement/updatesettings', to: 'announcements#updatesettings'
2020-05-19 04:31:57 +00:00
post 'announcement/import_from_wp', to: 'announcements#import_from_wp'
post 'announcement/generate_iframe_url' => 'announcements#generate_iframe_url'
2014-04-03 03:18:02 +00:00
resources :announcements
2020-07-30 14:12:21 +00:00
get 'announcements/:id/comment'=> 'announcements#comment'
get 'annc-comment-hidden/:id' => 'announcements#comment_hidden'
2022-03-29 06:25:10 +00:00
resource :announcement,:only => [] do
collection do
get "edit_sort"
post "update_sort_setting", to: 'announcements#update_sort_setting'
post "update_sort", to: 'announcements#update_sort'
end
end
end
2014-04-03 03:18:02 +00:00
2022-03-29 06:25:10 +00:00
resources :announcements do
collection do
get ':slug_title-:uid', to: 'announcements#show', as: :display
end
2014-04-01 07:12:43 +00:00
end
2022-05-09 12:13:29 +00:00
post "/xhr/announcements/feed_add_remote/:uid" => "announcement_feeds#feed_add_remote"
post "/xhr/announcements/feed_remove_remote/:uid" => "announcement_feeds#feed_remove_remote"
2022-03-29 06:25:10 +00:00
get "/xhr/announcements/feed/:uid" => "announcement_feeds#feed"
get "/xhr/announcements/rssfeed/:uid" => "announcement_feeds#rssfeed"
get "/xhr/announcements/feeds" => "announcement_feeds#feeds"
get '/xhr/announcements/announcement.json', to: 'bulletins#get_bulletins'
get '/xhr/panel/announcement/widget/sync_data' => 'announcements#show_widget'
get '/xhr/announcements/:slug_title-:uid/comment', to: 'announcements#comment'
get '/xhr/announcements/file/:id/*f_name', to: 'announcements#get_file', format: false
2014-04-01 07:12:43 +00:00
end
end