From fca03f29ee85d0ec119b844d9eefc387c00b0931 Mon Sep 17 00:00:00 2001 From: "G. Gibson" Date: Mon, 29 Apr 2024 01:46:47 -0700 Subject: [PATCH] Added publish_route to www --- Services/www/www.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Services/www/www.rb b/Services/www/www.rb index 3b74b30..ccc6844 100644 --- a/Services/www/www.rb +++ b/Services/www/www.rb @@ -57,6 +57,11 @@ www_paths.each_pair do |moniker, path| end # ### Sinatra Bootstrap class Node0 < Sinatra::Application + def self.publish_route(the_method, path, options={}, &block) + route(the_method.to_s.upcase, path, options) do + block.call(the_method,request,session) + end + end enable :sessions #use Rack::Session::Cookie, {:key => "rack.session", :expire_after => 318513600, :same_site => :strict, :secure => true} #