This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new afd4e6d allow server data structure to be fetched separately
afd4e6d is described below
commit afd4e6d98ef61b7d0075d35028a3783f3297a091
Author: Sam Ruby <[email protected]>
AuthorDate: Mon Apr 13 16:55:12 2020 -0400
allow server data structure to be fetched separately
---
www/board/agenda/routes.rb | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index f7d17a8..718c963 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -188,13 +188,7 @@ post %r{/(\d\d\d\d-\d\d-\d\d)/feedback.json} do |date|
_json :'actions/feedback'
end
-# all agenda pages
-get %r{/(\d\d\d\d-\d\d-\d\d)/(.*)} do |date, path|
- agenda = "board_agenda_#{date.gsub('-','_')}.txt"
- pass unless Agenda.parse agenda, :quick
-
- @base = "#{env['SCRIPT_NAME']}/#{date}/"
-
+def server
if env['REMOTE_USER']
userid = env['REMOTE_USER']
elsif ENV['RACK_ENV'] == 'test'
@@ -253,6 +247,20 @@ get %r{/(\d\d\d\d-\d\d-\d\d)/(.*)} do |date, path|
}],
websocket: websocket
}
+end
+
+get '/server.json' do
+ _json server
+end
+
+# all agenda pages
+get %r{/(\d\d\d\d-\d\d-\d\d)/(.*)} do |date, path|
+ agenda = "board_agenda_#{date.gsub('-','_')}.txt"
+ pass unless Agenda.parse agenda, :quick
+
+ @base = "#{env['SCRIPT_NAME']}/#{date}/"
+
+ @server = server
@page = {
path: path,