aboutsummaryrefslogtreecommitdiff
path: root/module/entry-points
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-07-04 01:58:52 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-07-07 13:10:38 +0200
commit27884c59318895bdaf9073944eb7e2037875ec0b (patch)
tree15f9d508fe67d9d738a692588cdca13535eb091f /module/entry-points
parentAdd insert-ordered. (diff)
downloadcalp-27884c59318895bdaf9073944eb7e2037875ec0b.tar.gz
calp-27884c59318895bdaf9073944eb7e2037875ec0b.tar.xz
Add live import of event.
Diffstat (limited to 'module/entry-points')
-rw-r--r--module/entry-points/import.scm4
-rw-r--r--module/entry-points/server.scm2
2 files changed, 4 insertions, 2 deletions
diff --git a/module/entry-points/import.scm b/module/entry-points/import.scm
index cc67b448..3fa20055 100644
--- a/module/entry-points/import.scm
+++ b/module/entry-points/import.scm
@@ -49,7 +49,9 @@
(let loop ((c #\space))
(case c
[(#\n #\N) (throw 'return)]
- [(#\y #\Y) (map (lambda (e) (calendar-import calendar e))
+ [(#\y #\Y) (map (lambda (e)
+ (add-event calendar e)
+ (save-event e))
(children new-events))]
[else
(let ((line (read-line)))
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm
index 4810dc0c..aaff398e 100644
--- a/module/entry-points/server.scm
+++ b/module/entry-points/server.scm
@@ -141,7 +141,7 @@
(parameterize ((warnings-are-errors #t))
(catch 'warning
- (lambda () (calendar-import calendar event))
+ (lambda () (add-event calendar event))
(lambda (err fmt args)
(return (build-response code: 400)
(format #f "~?~%" fmt args)))))