From 8bf0bca2c77a4af53002f43941fe634f3c12ef56 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 25 Aug 2026 21:14:00 -0700 Subject: routes: After creating a book, return to index --- src/controller/routes.phel | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/controller/routes.phel b/src/controller/routes.phel index 5dd41a3..4569472 100644 --- a/src/controller/routes.phel +++ b/src/controller/routes.phel @@ -31,7 +31,4 @@ (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}))}))))) - (h/response-from-map {:status 201 - :body (list (pdo/select conn "select * from books") - (pdo/select conn "select * from authors") - (pdo/select conn "select * from authors_books"))})) + (h/response-from-map {:status 301 :headers {:location "/"}})) -- cgit v1.3-2-g0d8e