diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-03 00:58:40 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-03 00:58:40 +0200 |
commit | 68647d3c1aa8130df878223638bc54c5d332cc5e (patch) | |
tree | 70a894c41aec4888a7eb1a9bf1cf55255e161bba /module/entry-points/server.scm | |
parent | Minor fixups. (diff) | |
download | calp-68647d3c1aa8130df878223638bc54c5d332cc5e.tar.gz calp-68647d3c1aa8130df878223638bc54c5d332cc5e.tar.xz |
Move <events> methods to own module for easier loading.
Diffstat (limited to '')
-rw-r--r-- | module/entry-points/server.scm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm index 824770af..7fa6ceb0 100644 --- a/module/entry-points/server.scm +++ b/module/entry-points/server.scm @@ -33,7 +33,7 @@ :use-module (output html) :use-module (output ical) - :autoload (vcomponent instance) (get-calendars global-event-object) + :autoload (vcomponent instance) (global-event-object) :export (main) ) @@ -113,12 +113,12 @@ (return (build-response code: 400) "uid required")) - (aif (get-event-by-uid uid) + (aif (get-event-by-uid global-event-object uid) (begin ;; It's hard to properly remove a file. I also want a way to undo accidental ;; deletions. Therefore I simply save the X-HNH-REMOVED flag to the file, and ;; then simple don't use those events when loading. - (catch 'stack-overflow (lambda () (remove-event it)) + (catch 'stack-overflow (lambda () (remove-event global-event-object it)) (lambda _ (display "It overflew...\n" (current-error-port)) (return (build-response code: 500) @@ -240,7 +240,7 @@ (print-all-events)))))) (GET "/calendar/:uid{.*}.xcs" (uid) - (aif (get-event-by-uid uid) + (aif (get-event-by-uid global-event-object uid) (return '((content-type application/calendar+xml)) ;; TODO sxml->xml takes a port, would be better ;; to give it the return port imidiately. @@ -256,7 +256,7 @@ (format #f "No component with UID=~a found." uid)))) (GET "/calendar/:uid{.*}.ics" (uid) - (aif (get-event-by-uid uid) + (aif (get-event-by-uid global-event-object uid) (return '((content-type text/calendar)) (with-output-to-string (lambda () (print-components-with-fake-parent |