minor tweaks

This commit is contained in:
G. Gibson 2024-05-05 18:30:11 -07:00
commit f2d5305fe0
2 changed files with 13 additions and 0 deletions

View file

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