Browse code

Added stipulation for non-existant URL entries

Jaidyn Lev authored on 2018-06-14 06:24:40
Showing 1 changed files
... ...
@@ -2,5 +2,11 @@
2 2
 
3 3
 (load "init.lisp")
4 4
 
5
-(doormat:increment-visitors cl-cgi:*query-string*)
6
-(format t "~A" (doormat:fetch-visitors cl-cgi:*query-string*))
5
+(let ((visitors (doormat:fetch-visitors cl-cgi:*query-string*)))
6
+  (if visitors
7
+    (doormat:increment-visitors cl-cgi:*query-string*)
8
+    (doormat:create-entry cl-cgi:*query-string*))
9
+  
10
+  (if visitors
11
+    (format t "~A" visitors)
12
+    (format t "1")))