From 41d6a73aff30bcb6fe50421b75033565586aa928 Mon Sep 17 00:00:00 2001 From: alma Date: Tue, 15 Apr 2025 11:58:01 +0200 Subject: [PATCH] news widget design 12 --- app/api/news/route.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/api/news/route.ts b/app/api/news/route.ts index 0dd42cd..57af065 100644 --- a/app/api/news/route.ts +++ b/app/api/news/route.ts @@ -7,7 +7,6 @@ const pool = new Pool({ port: 5432, database: 'rivacube', user: 'alma', - password: 'rivacube', connectionTimeoutMillis: 5000, query_timeout: 5000 }); @@ -89,15 +88,15 @@ export async function GET() { console.log('Connected to PostgreSQL database'); const result = await client.query( - 'SELECT * FROM news ORDER BY date DESC LIMIT 3' + 'SELECT * FROM news ORDER BY date DESC LIMIT 5' ); const formattedNews = result.rows.map(article => { const { displayDate, timestamp } = formatDateTime(article.date); return { id: article.id, - title: truncateText(article.title, 55), - description: truncateText(article.description, 85), + title: truncateText(article.title, 100), + description: truncateText(article.description, 150), displayDate, timestamp, source: formatSource(article.source),