mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-30 22:50:10 +03:00
feature #1398: Rename custom_routes to routes
This commit is contained in:
parent
8aa51eee67
commit
f82755ba67
@ -248,7 +248,7 @@ VAR_DIRS="$VAR_LOCATION/remotes \
|
||||
$VAR_LOCATION/remotes/auth/server_cipher \
|
||||
$VAR_LOCATION/remotes/auth/dummy"
|
||||
|
||||
SUNSTONE_DIRS="$SUNSTONE_LOCATION/custom_routes \
|
||||
SUNSTONE_DIRS="$SUNSTONE_LOCATION/routes \
|
||||
$SUNSTONE_LOCATION/models \
|
||||
$SUNSTONE_LOCATION/models/OpenNebulaJSON \
|
||||
$SUNSTONE_LOCATION/public \
|
||||
|
@ -94,22 +94,22 @@
|
||||
:marketplace_url: https://marketplace.c12g.com/appliance
|
||||
|
||||
################################################################################
|
||||
# Custom routes
|
||||
# Routes
|
||||
################################################################################
|
||||
|
||||
# Array of files containing ruby code to extend the default sunstone-server
|
||||
# routes. These files must be placed inside the custom_routes directory
|
||||
# in the sunstone root dir (/usr/lib/one/sunstone/custom_rotues)
|
||||
# in the sunstone root dir (/usr/lib/one/sunstone/routes)
|
||||
#
|
||||
# Example:
|
||||
# $ ls /usr/lib/one/sunstone/custom_routes
|
||||
# $ ls /usr/lib/one/sunstone/routes
|
||||
# custom.rb other.rb
|
||||
#
|
||||
# $ cat /usr/lib/one/sunstone/custom_routes/example.rb
|
||||
# $ cat /usr/lib/one/sunstone/routes/example.rb
|
||||
# get '/custom' do
|
||||
# body "It works"
|
||||
# end
|
||||
#
|
||||
#:custom_routes:
|
||||
#:routes:
|
||||
# - custom
|
||||
# - other
|
||||
|
@ -208,9 +208,9 @@ end
|
||||
##############################################################################
|
||||
# Custom routes
|
||||
##############################################################################
|
||||
if settings.config[:custom_routes]
|
||||
settings.config[:custom_routes].each { |route|
|
||||
require "custom_routes/#{route}"
|
||||
if settings.config[:routes]
|
||||
settings.config[:routes].each { |route|
|
||||
require "routes/#{route}"
|
||||
}
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user