summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-02-29 08:33:25 +0100
committerRicardo Wurmus <rekado@elephly.net>2020-02-29 08:33:25 +0100
commit65e4f4d79fd67d2a17d4b80cbe2139ab9a94d3c1 (patch)
tree6cbb22f4e25438ed32610be41b174ff80730de90
parent72e21299733674c36c178b6c1a93d0015923d3cc (diff)
controller: Match method symbols.
* mumi/web/controller.scm (controller): Match method symbols.
-rw-r--r--mumi/web/controller.scm20
1 files 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))))