Add Server Data management
This commit is contained in:
@@ -2,17 +2,15 @@ import { publicProcedure, router } from '~/server/trpc/init';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const appRouter = router({
|
||||
hello: publicProcedure
|
||||
.input(
|
||||
z.object({
|
||||
text: z.string(),
|
||||
}),
|
||||
)
|
||||
.query((opts) => {
|
||||
return {
|
||||
greeting: `hello ${opts.input.text}`,
|
||||
};
|
||||
hello: publicProcedure.input(
|
||||
z.object({
|
||||
text: z.string(),
|
||||
}),
|
||||
).query((opts) => {
|
||||
return {
|
||||
greeting: `hello ${opts.input.text}`,
|
||||
};
|
||||
}),
|
||||
});
|
||||
|
||||
// export type definition of API
|
||||
|
||||
Reference in New Issue
Block a user