()
| 2 | import { byLatestCatalogEntry, isPublishedTheme, publicTheme } from '../lib/themes' |
| 3 | |
| 4 | export async function GET() { |
| 5 | const themes = (await getCollection('themes')) |
| 6 | .filter(isPublishedTheme) |
| 7 | .sort(byLatestCatalogEntry) |
| 8 | .map(publicTheme) |
| 9 | |
| 10 | return new Response(JSON.stringify(themes, null, 2), { |
| 11 | headers: { |
| 12 | 'content-type': 'application/json; charset=utf-8', |
| 13 | 'cache-control': 'public, max-age=300' |
| 14 | } |
| 15 | }) |
| 16 | } |
nothing calls this directly
no outgoing calls
no test coverage detected