8 lines
321 B
TypeScript
8 lines
321 B
TypeScript
// GET /api/hello -> { message: "<translated>", lang: "<active>" }
|
|
// Uses ctx.t / ctx.lang, resolved from the wire-lang cookie or Accept-Language.
|
|
import type { Context } from "@wrnexus/core";
|
|
|
|
export const GET = async (ctx: Context) => {
|
|
return Response.json({ message: ctx.t("api.greeting"), lang: ctx.lang });
|
|
};
|