diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-24 17:09:37 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-24 17:09:37 +0200 |
commit | 2c70ae5ce205a48c6d5c0baff3c60f793735f9a6 (patch) | |
tree | 1d2c43b849f691230f413944f914332dbdfb800d /module | |
parent | Move parenthesis. (diff) | |
download | calp-2c70ae5ce205a48c6d5c0baff3c60f793735f9a6.tar.gz calp-2c70ae5ce205a48c6d5c0baff3c60f793735f9a6.tar.xz |
/insert endpoint actually saves the events.
Diffstat (limited to '')
-rw-r--r-- | module/entry-points/server.scm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm index 706f2699..b7d4afff 100644 --- a/module/entry-points/server.scm +++ b/module/entry-points/server.scm @@ -180,11 +180,19 @@ (return (build-response code: 400) (format #f "~?~%" fmt args))))) + ;; NOTE Posibly defer save to a later point. + ;; That would allow better asyncronous preformance. + ((@ (output vdir) save-event) event) + (format (current-error-port) "Event inserted ~a~%" (prop event 'UID)) - (return '((content-type text/plain)) - "Event inserted\r\n")))) + (return '((content-type application/xml)) + (with-output-to-string + (lambda () + (sxml->xml + `(properties + (uid (text ,(prop event 'UID))))))))))) ;; Get specific page by query string instead of by path. ;; Useful for <form>'s, since they always submit in this form, but also |