From e0e990a248e3a18f88d7a12f3c353b8664bd6898 Mon Sep 17 00:00:00 2001 From: unwox Date: Wed, 30 Oct 2024 12:28:41 +0600 Subject: archive old products and do not display them --- bin/serve.fnl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin/serve.fnl') diff --git a/bin/serve.fnl b/bin/serve.fnl index 98e0aac..82759b8 100644 --- a/bin/serve.fnl +++ b/bin/serve.fnl @@ -139,6 +139,7 @@ price_per AS \"price-per\", year FROM products + WHERE archived = false ORDER BY ROW_NUMBER() over (PARTITION BY site ORDER BY ROWID) LIMIT ?" [limit]))) @@ -201,6 +202,7 @@ INNER JOIN products ON search.fid = products.url LEFT JOIN product_tags ON product_tags.product = search.fid WHERE search.`table` = 'products' + AND products.archived = false %s" where-sql) where-vars))) @@ -224,6 +226,7 @@ INNER JOIN products ON search.fid = products.url LEFT JOIN product_tags ON product_tags.product = products.url WHERE search.`table` = 'products' + AND products.archived = false %s ORDER BY ROW_NUMBER() over (PARTITION BY products.site ORDER BY products.ROWID), rank -- cgit v1.2.3