24 lines
604 B
Ruby
24 lines
604 B
Ruby
Rails.application.routes.draw do
|
|
|
|
locales = Site.first.in_use_locales rescue I18n.available_locales
|
|
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
|
namespace :admin do
|
|
resources :online_courses do
|
|
collection do
|
|
get "get_temp_dir_name"
|
|
post "upload_temp_file"
|
|
post "clear_temp_dir"
|
|
post "extract_zip"
|
|
end
|
|
member do
|
|
get "add_lecture"
|
|
post "create_lecture"
|
|
get "edit_lecture"
|
|
patch "update_lecture"
|
|
delete "delete_lecture"
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end |