Fix survey function call

This commit is contained in:
Marcus Kammer 2024-06-02 21:10:08 +02:00
parent 66054cddbe
commit 8ec67cd985
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -3,11 +3,12 @@
(defun survey-uri-p (uri)
"Check if the request URI matches the pattern '/survey/<numeric>'"
(check-type uri string)
(let ((parts (split-uri uri)))
(let ((parts (split-uri uri))
(survey (make-survey uri)))
(and (= (length parts) 2)
(string= (first parts) "survey")
(every #'digit-char-p (second parts))
(survey-id-p (parse-integer (second parts))))))
(funcall survey 'id-p))))
(defun survey-uri (request)
(let ((uri (request-uri request)))