From b1e6651b7e409dcbc644084f9f4a051bd97087e0 Mon Sep 17 00:00:00 2001 From: unwox Date: Thu, 31 Oct 2024 15:57:55 +0600 Subject: do not display empty tags --- bin/serve.fnl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin') 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] -- cgit v1.2.3