aboutsummaryrefslogtreecommitdiffstats
path: root/webstats/server.lisp
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2025-02-10 13:29:17 +0100
committerOscar Najera <hi@oscarnajera.com>2025-02-10 13:29:17 +0100
commitb9901f220007bda328427db8dcbe822bb89c99bc (patch)
tree01bed2509e917201ab4b023d7e9532826d37485d /webstats/server.lisp
parent30627e57593c4533b7d1cd49168e22f05a91d759 (diff)
downloadscratch-b9901f220007bda328427db8dcbe822bb89c99bc.tar.gz
scratch-b9901f220007bda328427db8dcbe822bb89c99bc.tar.bz2
scratch-b9901f220007bda328427db8dcbe822bb89c99bc.zip
add new visit row with foreign key previewwebstats
Diffstat (limited to 'webstats/server.lisp')
-rw-r--r--webstats/server.lisp19
1 files changed, 12 insertions, 7 deletions
diff --git a/webstats/server.lisp b/webstats/server.lisp
index 3fe237a..5df77b3 100644
--- a/webstats/server.lisp
+++ b/webstats/server.lisp
@@ -29,13 +29,18 @@
;; (create-stats-table db))
;; (sqlite:with-open-database (db "test.db")
-;; (insert db
-;; :click nil
-;; :page "ho"
-;; :referer "ref"
-;; :ip "13"
-;; :user-agent "sly"
-;; :title "try"))
+;; (sqlite:with-transaction db
+;; (let ((ip "122.0.0.1")
+;; (agent "sly"))
+;; (add-ip db :ip ip)
+;; (add-user-agent db :user-agent agent)
+;; (insert db
+;; :click nil
+;; :page "ho"
+;; :referer "ref"
+;; :ip ip
+;; :user-agent agent
+;; :title "try"))))
(hunchentoot:define-easy-handler
(visit :uri "/visit" :default-request-type :both)