MCPcopy Create free account
hub / github.com/FirefoxCSS-Store/FirefoxCSS-Store.github.io / GET

Function GET

src/pages/themes.json.ts:4–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { byLatestCatalogEntry, isPublishedTheme, publicTheme } from '../lib/themes'
3
4export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected