diff options
| author | 2026-09-08 01:14:09 -0700 | |
|---|---|---|
| committer | 2026-09-08 01:14:09 -0700 | |
| commit | d82e2edcde3fec1f1a19b69645428a35cf3c4e11 (patch) | |
| tree | 68e45bb00684805bd20bad647dd3f6eb573a4734 | |
| parent | 801f360b6fe596ed7c848b2aa04d28a526216fa7 (diff) | |
| download | lezer-d82e2edcde3fec1f1a19b69645428a35cf3c4e11.tar.gz lezer-d82e2edcde3fec1f1a19b69645428a35cf3c4e11.zip | |
authors: Trim names when dealing with multiple authors
| -rw-r--r-- | src/controller/routes.phel | 2 |
1 files changed, 1 insertions, 1 deletions
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 "/"}})) |
