04459c7355f17d7397aa67e79d7e1c08ede1d443
[microbotany.git] / delete-confirm.scm
1 ;; Account deletion confirmation
2
3 (lambda (uri)
4   (import (chicken file)
5           (chicken pathname)
6           (chicken string)
7           uri-common)
8   (let ((query (uri-query uri)))
9     (if (null? query)
10         (print "No account specified.")
11         (begin
12           (serve-document-header (ext->mime "gmi"))
13           (print "Are you sure you want to delete your account?  (This action is irreversible!)")
14           (print "\n=> " (uri->string (update-uri uri
15                                                  path: '(/ "microbotany" "delete.scm")))
16                  " Yes, delete my account.")
17           (print "\n=> " (uri->string (update-uri uri
18                                                  path: '(/ "microbotany" "view.scm")))
19                  " No, take me back to my garden!")))))