diff options
| author | 2026-08-25 21:14:00 -0700 | |
|---|---|---|
| committer | 2026-08-25 21:14:00 -0700 | |
| commit | 8bf0bca2c77a4af53002f43941fe634f3c12ef56 (patch) | |
| tree | 485a77dbdace978e00aaf890341a2740d62ef584 /src/controller | |
| parent | 2d9a5a31676d2886a42e34170706a78d93ce1f18 (diff) | |
| download | lezer-8bf0bca2c77a4af53002f43941fe634f3c12ef56.tar.gz lezer-8bf0bca2c77a4af53002f43941fe634f3c12ef56.zip | |
routes: After creating a book, return to index
Diffstat (limited to 'src/controller')
| -rw-r--r-- | src/controller/routes.phel | 5 |
1 files changed, 1 insertions, 4 deletions
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 "/"}})) |
