config/routes.rb in phcscriptcdnpro-2.1.0 vs config/routes.rb in phcscriptcdnpro-3.0.0
- old
+ new
@@ -1,34 +1,32 @@
Phcscriptcdnpro::Engine.routes.draw do
- # CDN Frontend
- namespace :cdnsite do
-
+ namespace :frontend do
# Frontend Routes
resources :cdnpages
-
end
# Script CDN Listing System
- namespace :scriptcdn do
-
+ namespace :script do
# Main Script Module
- resources :mains do
- resources :authors
- resources :urls
- resources :versions
- resources :informations
+ resources :listings, class_name: 'Phcscriptcdn::Script::Listing' do
+ resources :urls, class_name: 'Phcscriptcdn::Script::Url'
+ resources :authors, class_name: 'Phcscriptcdn::Script::Author'
end
-
+ resources :extensions, class_name: 'Phcscriptcdn::Script::Extension'
+ resources :versions, class_name: 'Phcscriptcdn::Script::Version'
+ resources :licences, class_name: 'Phcscriptcdn::Script::Licence'
end
# Application API
namespace :api, :path => "", :constraints => {:subdomain => "api"} do
+ namespace :v1 do
- # Routes for API
- resources :mains, defaults: {format: 'json'}
- resources :informations, defaults: {format: 'json'}
- resources :versions, defaults: {format: 'json'}
+ # Routes for API
+ resources :mains, defaults: {format: 'json'}
+ resources :informations, defaults: {format: 'json'}
+ resources :versions, defaults: {format: 'json'}
+ end
end
end