This repository has been archived on 2026-06-19. You can view files and clone it, but cannot push or open issues or pull requests.
gso-landingpage/src/app/api/notion-pm/route.ts
Athena b95e4874f1 Add dashboard, API routes, Olga route, and supporting files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 17:02:50 +02:00

17 lines
416 B
TypeScript

import { NextResponse } from 'next/server'
import { fetchAllTodos } from '@/lib/notion-pm'
export const revalidate = 300
export async function GET() {
try {
const todos = await fetchAllTodos()
return NextResponse.json({
todos,
timestamp: new Date().toISOString(),
count: todos.length,
})
} catch (err) {
return NextResponse.json({ error: String(err) }, { status: 500 })
}
}