Check types for view

This commit is contained in:
Marcus Kammer 2024-06-02 14:38:27 +02:00
parent 2a314583d6
commit cdb8381dfe
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -1,9 +1,9 @@
(in-package :ml-survey/views)
(defun survey (survey)
(defun survey (id properties)
"Generates the view to show the survey created."
(let ((id (format nil "~a" (first survey)))
(properties (first (rest survey))))
(check-type id string)
(check-type properties list)
(with-page (:title "Surveys")
(navbar-en)
(:section :class "container"
@ -21,4 +21,4 @@
(:td (if (string= key "questionnaire")
(:a :href (concatenate 'string "/survey/" id value)
value)
value))))))))))
value)))))))))