portfolio/app/api/articles/route.ts

8 lines
211 B
TypeScript
Raw Normal View History

2024-10-01 21:00:02 +00:00
import {getAllArticles} from '@/lib/getAllArticles'
export async function GET(request: Request) {
const articles = await getAllArticles()
return new Response(JSON.stringify(articles), {status: 200})
}