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