mirror of
https://github.com/mistergibson/gxg-server.git
synced 2026-10-19 14:59:45 -07:00
Various changes - added api system
This commit is contained in:
parent
e2ae775dd1
commit
0f9f967c77
8 changed files with 275 additions and 38 deletions
|
|
@ -389,6 +389,17 @@ module GxG
|
|||
def fs_root()
|
||||
::File.expand_path("#{::GxG::SYSTEM.gxg_root()}/#{self.vfs_root()}")
|
||||
end
|
||||
# ### API Support
|
||||
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])
|
||||
end
|
||||
end
|
||||
def unpublish_api()
|
||||
if ::GxG::Services::service_available?(:www)
|
||||
::GxG::SERVICES[:www].call_event({:unpublish_api => {:path => "/#{@provides.to_s}"}}, ::GxG::DB[:administrator])
|
||||
end
|
||||
end
|
||||
# ### Service Management
|
||||
def provides()
|
||||
@provides
|
||||
|
|
|
|||
Loading…
Reference in a new issue