From d82e2edcde3fec1f1a19b69645428a35cf3c4e11 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 8 Sep 2026 01:14:09 -0700 Subject: authors: Trim names when dealing with multiple authors --- src/controller/routes.phel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/controller/routes.phel b/src/controller/routes.phel index f6ec95e..acfc2af 100644 --- a/src/controller/routes.phel +++ b/src/controller/routes.phel @@ -34,7 +34,7 @@ (for [a :in authors] (pdo/insert conn :authors_books {:book_id book-id :author_id (or (pdo/fetch-column (pdo/query conn "select id from authors where name = :name" {:name a})) - (pdo/insert conn :authors {:name a + (pdo/insert conn :authors {:name (str/trim a) :created_at time :updated_at time}))}))))) (h/response-from-map {:status 301 :headers {:location "/"}})) -- cgit v1.3-2-g0d8e