From 3565fa93150562e753fecfa5274d5d0d291820b3 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Thu, 27 Oct 2022 23:16:00 +0100 Subject: [PATCH] implement update-search-url in nera package. This enables the site's back-end to update the search-url slot in the site-settings class and database. --- src/nera.lisp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nera.lisp b/src/nera.lisp index f5e255b..063657f 100644 --- a/src/nera.lisp +++ b/src/nera.lisp @@ -25,6 +25,7 @@ #:set-home-page #:update-enable-site-logo-setting #:update-site-name + #:update-search-url #:create-page #:update-page #:get-page @@ -245,6 +246,13 @@ editted article entry as the first item in the list.." (setf (site-settings::home-page-of settings-to-update) value) (mito:save-dao settings-to-update)))) +(defun update-search-url (search-url) + "Sets the page (in /storage/pages) to be displayed on the sites home page." + (with-connection (db) + (let ((settings-to-update (mito:find-dao 'site-settings))) + (setf (site-settings::search-url-of settings-to-update) search-url) + (mito:save-dao settings-to-update)))) + (defun update-site-name (name) "Updates the website's `SITE-NAME' the database." (with-connection (db)