Add a parallel experimental config providers HttpApi endpoint, keep the schema local to the slice for now, and normalize the provider payload through JSON serialization so the draft route returns a stable JSON shape.
12 lines
400 B
TypeScript
12 lines
400 B
TypeScript
import { lazy } from "@/util/lazy"
|
|
import { Hono } from "hono"
|
|
import { ConfigHttpApiHandler } from "./config"
|
|
import { QuestionHttpApiHandler } from "./question"
|
|
|
|
export const HttpApiRoutes = lazy(() =>
|
|
new Hono()
|
|
.all("/question", QuestionHttpApiHandler)
|
|
.all("/question/*", QuestionHttpApiHandler)
|
|
.all("/config", ConfigHttpApiHandler)
|
|
.all("/config/*", ConfigHttpApiHandler),
|
|
)
|