From 65e4f4d79fd67d2a17d4b80cbe2139ab9a94d3c1 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 29 Feb 2020 08:33:25 +0100 Subject: controller: Match method symbols. * mumi/web/controller.scm (controller): Match method symbols. --- mumi/web/controller.scm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mumi/web/controller.scm b/mumi/web/controller.scm index 68901b9..7f0d9d5 100644 --- a/mumi/web/controller.scm +++ b/mumi/web/controller.scm @@ -49,11 +49,11 @@ (define (controller request body) (match-lambda - ((GET) + (('GET) (apply render-html (index))) - ((GET "easy") + (('GET "easy") (apply render-html (list-of-matching-bugs "tag:easy" (easy-bugs)))) - ((GET "search") + (('GET "search") (let ((query (-> request request-uri uri-query @@ -99,24 +99,24 @@ #:attributes attrs #:max 800))))))) `(p "Could not search for " (strong ,query) ".")))))) - ((GET "issue" (? string->number id)) + (('GET "issue" (? string->number id)) (render-with-error-handling (lambda () (or (and=> (fetch-bug id) issue-page) (unknown id))) `(p "Could not access issue #" (strong ,id) "."))) - ((GET "issue" (? string->number id) + (('GET "issue" (? string->number id) "attachment" (? string->number msg-num) (? string->number path) ...) (handle-download (string->number id) (string->number msg-num) (map string->number path))) - ((GET "issue" not-an-id) + (('GET "issue" not-an-id) (apply render-html (unknown not-an-id))) - ((GET "snippet" "recent") + (('GET "snippet" "recent") (apply render-html (list #:sxml (list-of-bugs (recent-bugs 10))))) - ((GET "snippet" "priority") + (('GET "snippet" "priority") (apply render-html (list #:sxml (priority-bugs)))) - ((GET "help") + (('GET "help") (apply render-html (help))) - ((GET path ...) + (('GET path ...) (render-static-asset request)))) -- cgit v1.2.3