Various changes - added api system

This commit is contained in:
G. Gibson 2023-02-28 10:07:01 -08:00
commit 0f9f967c77
8 changed files with 275 additions and 38 deletions

View file

@ -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