aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web/server/routers/_app.ts
blob: 47c586b7c55641abab124d64822668df62444cc8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { z } from "zod";
import { procedure, router } from "../trpc";
export const appRouter = router({
    hello: procedure
        .input(
            z.object({
                text: z.string(),
            }),
        )
        .query((opts) => {
            return {
                greeting: `hello ${opts.input.text}`,
            };
        }),
});
// export type definition of API
export type AppRouter = typeof appRouter;