Changes to the compse yml and the way and amout of artikeltexte are delivered and taht not duplicates are displayed
This commit is contained in:
@@ -207,9 +207,20 @@ func main() {
|
||||
|
||||
rows, err := conn.Query(r.Context(), `
|
||||
SELECT article_id, title, link, summary, image, published_at
|
||||
FROM articles
|
||||
WHERE image IS NOT NULL
|
||||
ORDER BY COALESCE(published_at, created_at) DESC
|
||||
FROM (
|
||||
SELECT DISTINCT ON (COALESCE(article_id, link, title))
|
||||
article_id,
|
||||
title,
|
||||
link,
|
||||
summary,
|
||||
image,
|
||||
published_at,
|
||||
COALESCE(published_at, created_at) AS sort_ts
|
||||
FROM articles
|
||||
WHERE image IS NOT NULL
|
||||
ORDER BY COALESCE(article_id, link, title), COALESCE(published_at, created_at) DESC
|
||||
) deduped
|
||||
ORDER BY sort_ts DESC
|
||||
LIMIT 20
|
||||
`)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user