mirror of
https://github.com/mistergibson/gxg-server.git
synced 2026-10-19 06:59:44 -07:00
minor tweaks
This commit is contained in:
parent
fca03f29ee
commit
f2d5305fe0
2 changed files with 13 additions and 0 deletions
|
|
@ -449,6 +449,11 @@ module GxG
|
|||
::File.expand_path("#{::GxG::SYSTEM.gxg_root()}/#{self.vfs_root()}")
|
||||
end
|
||||
# ### API Support
|
||||
def publish_route(the_method=:get, path, options={}, &block)
|
||||
if ::GxG::Services::service_available?(:www)
|
||||
::GxG::SERVICES[:www].call_event({:publish_route => {:http_method => the_method, :path => path, :options => options, :code => block}}, ::GxG::DB[:administrator])
|
||||
end
|
||||
end
|
||||
def publish_api()
|
||||
if ::GxG::Services::service_available?(:www)
|
||||
::GxG::SERVICES[:www].call_event({:publish_api => {:service => self, :path => "/#{@provides.to_s}"}}, ::GxG::DB[:administrator])
|
||||
|
|
|
|||
Loading…
Reference in a new issue