Removed imports.
[microbotany.git] / delete.scm
1 ;; Delete account
2
3 (lambda (uri)
4   (let ((query (uri-query uri)))
5     (serve-document-header (ext->mime "gmi"))
6     (if (null? query)
7         (print "No account specified.")
8         (let* ((hash (symbol->string (caar query)))
9                (account-file (make-pathname "accounts" hash)))
10           (if (file-exists? account-file)
11               (begin
12                 (delete-file account-file)
13                 (print "Garden successfully deleted."))
14               (print "Attempted to delete non-existent garden."))))
15     (print "\n=> /microbotany/ Return to μBotany")))