From 43e32338c7d24a2412fa745f30d7cd457072efd8 Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Sun, 2 Jun 2024 14:37:34 +0200 Subject: [PATCH] Move function --- src/handlers/main.lisp | 5 ----- src/handlers/survey.lisp | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/handlers/main.lisp b/src/handlers/main.lisp index 0f051a5..207cdff 100644 --- a/src/handlers/main.lisp +++ b/src/handlers/main.lisp @@ -10,11 +10,6 @@ (remove-if #'string-empty-p (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 () "Return today's date formatted as ISO-8601." (local-time:format-timestring nil diff --git a/src/handlers/survey.lisp b/src/handlers/survey.lisp index 5889094..d521670 100644 --- a/src/handlers/survey.lisp +++ b/src/handlers/survey.lisp @@ -1,5 +1,10 @@ (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) "Check if the request URI matches the pattern '/survey/'" (check-type uri string)