diff --git a/.nvmrc b/.nvmrc index 05cc650..94a1338 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1,2 +1,2 @@ -v20.11.1 +v22.20.0 diff --git a/package.json b/package.json index 115f9b9..60c5509 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,9 @@ { "name": "message-exporter", "version": "0.1.0", + "engines": { + "node": ">=22.0.0" + }, "scripts": { "dev": "COPILOT_ENV=local next dev", "build": "next build", diff --git a/src/app/page.tsx b/src/app/page.tsx index bcb5ace..3ba8861 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -11,8 +11,7 @@ import { const apiKey = need(process.env.COPILOT_API_KEY); -// One minute -export const maxDuration = 60000; +export const maxDuration = 300; export default async function Home({ searchParams, @@ -66,7 +65,7 @@ export default async function Home({ }); // For individual channels, client id is membershipEntityId and we need to get client detail based on that - const invividualChannels = individual.map((channel) => { + const invividualChannels = (individual || []).map((channel) => { const clientsChannels = clientsMap.get(channel.membershipEntityId); return {