Move function

This commit is contained in:
Marcus Kammer 2024-06-02 14:37:34 +02:00
parent 1f94736771
commit 43e32338c7
Signed by: marcuskammer
GPG key ID: C374817BE285268F
2 changed files with 5 additions and 5 deletions

View file

@ -10,11 +10,6 @@
(remove-if #'string-empty-p (remove-if #'string-empty-p
(uiop:split-string uri :separator "/"))) (uiop:split-string uri :separator "/")))
(defun valid-survey-id-p (id)
(check-type id integer)
(let ((ids (mapcar #'car (load-response (make-surveys-db-path)))))
(if (member id ids) t nil)))
(defun today () (defun today ()
"Return today's date formatted as ISO-8601." "Return today's date formatted as ISO-8601."
(local-time:format-timestring nil (local-time:format-timestring nil

View file

@ -1,5 +1,10 @@
(in-package :ml-survey/handlers) (in-package :ml-survey/handlers)
(defun survey-id-p (id)
(check-type id integer)
(let ((ids (mapcar #'car (load-response (make-surveys-db-path)))))
(if (member id ids) t nil)))
(defun survey-uri-p (uri) (defun survey-uri-p (uri)
"Check if the request URI matches the pattern '/survey/<numeric>'" "Check if the request URI matches the pattern '/survey/<numeric>'"
(check-type uri string) (check-type uri string)