diff options
| author | unwox <me@unwox.com> | 2024-10-31 15:57:55 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2024-10-31 15:57:55 +0600 |
| commit | b1e6651b7e409dcbc644084f9f4a051bd97087e0 (patch) | |
| tree | 5055ed22a8f3d997681cfa4bf64991430502f1da /bin/serve.fnl | |
| parent | 44d2ef624a116a4f468fb7944a844816effbc20e (diff) | |
do not display empty tags
Diffstat (limited to 'bin/serve.fnl')
| -rw-r--r-- | bin/serve.fnl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/serve.fnl b/bin/serve.fnl index 14073cf..69369fe 100644 --- a/bin/serve.fnl +++ b/bin/serve.fnl @@ -150,7 +150,9 @@ (must (luna.db.query db - "SELECT title FROM tags ORDER BY creation_time" + "SELECT DISTINCT tags.title FROM tags + INNER JOIN product_tags ON product_tags.tag = tags.title + ORDER BY creation_time" [])))) (fn query-products [{: query : tags : min-price : max-price : price-per : site} page] |
