diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-02 23:25:56 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-02 23:25:56 +0200 |
commit | 5188fb2251e02b32fd017dc7ba8cd6d0ce892c75 (patch) | |
tree | c79ed2f7b1734ebccc53fa4daee9ed1a5a2862c4 /module/entry-points/server.scm | |
parent | Repair vcomponent describe. (diff) | |
download | calp-5188fb2251e02b32fd017dc7ba8cd6d0ce892c75.tar.gz calp-5188fb2251e02b32fd017dc7ba8cd6d0ce892c75.tar.xz |
Remove (util app).
Diffstat (limited to '')
-rw-r--r-- | module/entry-points/server.scm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm index 5c3108cc..fd322c7d 100644 --- a/module/entry-points/server.scm +++ b/module/entry-points/server.scm @@ -1,6 +1,5 @@ (define-module (entry-points server) :use-module (util) - :use-module (util app) :use-module (util config) :use-module (util options) :use-module (util exceptions) @@ -34,6 +33,8 @@ :use-module (output html) :use-module (output ical) + :autoload (vcomponent instance) (get-calendars global-event-object) + :export (main) ) @@ -59,7 +60,7 @@ (cdr (scandir dir)))))) -(define-method (make-make-routes) +(define (make-make-routes) (make-routes ;; Manual redirect to not reserve root. @@ -77,8 +78,8 @@ (return `((content-type application/xhtml+xml)) (with-output-to-string (lambda () - (html-generate calendars: (getf 'calendars) - events: (getf 'event-set) + (html-generate calendars: (get-calendars global-event-object) + events: (get-event-set global-event-object) start-date: start-date end-date: (date+ start-date (date day: 6)) next-start: (lambda (d) (date+ d (date day: 7))) @@ -93,8 +94,8 @@ (return '((content-type application/xhtml+xml)) (with-output-to-string (lambda () - (html-generate calendars: (getf 'calendars) - events: (getf 'event-set) + (html-generate calendars: (get-calendars global-event-object) + events: (get-event-set global-event-object) start-date: start-date end-date: (date- (month+ start-date) (date day: 1)) @@ -144,7 +145,7 @@ ;; also, the default output gives everything. (let ((calendar (find (lambda (c) (string=? cal (prop c 'NAME))) - (getf 'calendars)))) + (get-calendars global-event-object)))) (unless calendar (return (build-response code: 400) |