diff --git a/lib/api/index.ts b/lib/api/index.ts index febb9da9f..ed369cb1c 100644 --- a/lib/api/index.ts +++ b/lib/api/index.ts @@ -1,7 +1,9 @@ import { Hono } from 'hono'; import rules from '@/api/radar/rules'; +import routes from '@/api/routes'; const app = new Hono(); -app.get('/radar/rules.json', rules); +app.get('/radar/rules', rules); +app.get('/routes', routes); export default app; diff --git a/lib/api/routes/index.ts b/lib/api/routes/index.ts new file mode 100644 index 000000000..b94ada752 --- /dev/null +++ b/lib/api/routes/index.ts @@ -0,0 +1,6 @@ +import type { Handler } from 'hono'; +import { namespaces } from '@/registry'; + +const handler: Handler = (ctx) => ctx.json(namespaces); + +export default handler;