From 0de241ef7db15cf704d6a70635bcd733192ffbfe Mon Sep 17 00:00:00 2001 From: pcarter Date: Thu, 9 Apr 2026 19:22:24 -0700 Subject: [PATCH] limit history --- app/api/history/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/history/route.ts b/app/api/history/route.ts index 5098589..97fbbc3 100644 --- a/app/api/history/route.ts +++ b/app/api/history/route.ts @@ -11,7 +11,7 @@ export async function GET() { } const result = await query( - 'SELECT id, iv, ciphertext, updated_at FROM chat_histories WHERE user_email = $1 ORDER BY updated_at DESC', + 'SELECT id, iv, ciphertext, updated_at FROM chat_histories WHERE user_email = $1 ORDER BY updated_at DESC LIMIT 50', [session.user.email], ); const rows = result.rows; -- 2.51.2