mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-04-30 20:39:30 +08:00
10 lines
305 B
TypeScript
10 lines
305 B
TypeScript
import type { RequestHandler } from './$types'
|
|
import { genPosts } from '$lib/utils/posts'
|
|
|
|
export const prerender = true
|
|
export const GET: RequestHandler = async () =>
|
|
new Response(JSON.stringify(genPosts(), null, 2), {
|
|
headers: {
|
|
'content-type': 'application/json; charset=utf-8'
|
|
}
|
|
})
|