diff options
| author | unwox <me@unwox.com> | 2024-10-30 12:28:41 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2024-10-30 12:28:41 +0600 |
| commit | e0e990a248e3a18f88d7a12f3c353b8664bd6898 (patch) | |
| tree | 040ca39f28d96b72aa2637a44e8602b73031fdc3 /bin/serve.fnl | |
| parent | 8daa0b56f8e53c34706870462b346749b824a9a7 (diff) | |
archive old products and do not display them
Diffstat (limited to 'bin/serve.fnl')
| -rw-r--r-- | bin/serve.fnl | 3 |
1 files changed, 3 insertions, 0 deletions
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 |
