summaryrefslogtreecommitdiff
path: root/lisp/sql
diff options
context:
space:
mode:
authorckonstanski <carlos.konstanski@olo.com>2024-05-27 16:57:01 -0600
committerckonstanski <carlos.konstanski@olo.com>2024-05-27 16:57:01 -0600
commitebd383b0e0a6168f99857126897b07395e24b41c (patch)
treeb3b37d7dda1d7562ece14e9c2396aa9cf6f72f30 /lisp/sql
parent6f397b2cd6b825a105a06591aa30469aab767591 (diff)
embed youtobe videos
Diffstat (limited to 'lisp/sql')
-rw-r--r--lisp/sql/gallery.lisp3
-rw-r--r--lisp/sql/general-pkg.lisp22
2 files changed, 15 insertions, 10 deletions
diff --git a/lisp/sql/gallery.lisp b/lisp/sql/gallery.lisp
index 2f4231d..501691d 100644
--- a/lisp/sql/gallery.lisp
+++ b/lisp/sql/gallery.lisp
@@ -16,6 +16,9 @@
(mime_type :initarg :mime_type
:initform nil
:accessor mime_type)
+ (video_embed_url :initarg :video_embed_url
+ :initform nil
+ :accessor video_embed_url)
(content :initarg :content
:initform nil
:accessor content)
diff --git a/lisp/sql/general-pkg.lisp b/lisp/sql/general-pkg.lisp
index 5a92ed4..0d1b3db 100644
--- a/lisp/sql/general-pkg.lisp
+++ b/lisp/sql/general-pkg.lisp
@@ -23,20 +23,22 @@
(defmethod insert-gallery ((general-pkg general-pkg) (gallery gallery))
(setf (*table gallery) (format nil
- "general.insert_gallery('~a', '~a', '~a', '~a')"
- (description gallery)
- (filename gallery)
- (mime_type gallery)
- (content gallery)))
+ "general.insert_gallery(~a, ~a, ~a, ~a, ~a)"
+ (org-ckons-sql::sanitize gallery (description gallery))
+ (org-ckons-sql::sanitize gallery (filename gallery))
+ (org-ckons-sql::sanitize gallery (mime_type gallery))
+ (org-ckons-sql::sanitize gallery (video_embed_url gallery))
+ (org-ckons-sql::sanitize gallery (content gallery))))
(setf (id gallery) (caar (call-pg-function general-pkg gallery)))
(id gallery))
(defmethod update-gallery ((general-pkg general-pkg) (gallery gallery))
(setf (*table gallery) (format nil
- "general.update_gallery(~a, '~a', '~a', '~a', '~a')"
+ "general.update_gallery(~a, ~a, ~a, ~a, ~a, ~a)"
(id gallery)
- (description gallery)
- (filename gallery)
- (mime_type gallery)
- (content gallery)))
+ (org-ckons-sql::sanitize gallery (description gallery))
+ (org-ckons-sql::sanitize gallery (filename gallery))
+ (org-ckons-sql::sanitize gallery (mime_type gallery))
+ (org-ckons-sql::sanitize gallery (video_embed_url gallery))
+ (org-ckons-sql::sanitize gallery (content gallery))))
(caar (call-pg-function general-pkg gallery)))