remove example router
This commit is contained in:
parent
f09b46558f
commit
414d69493c
2 changed files with 0 additions and 27 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import { createTRPCRouter } from "~/server/api/trpc";
|
||||
import { exampleRouter } from "~/server/api/routers/example";
|
||||
import { videoRouter } from "~/server/api/routers/video";
|
||||
import { stripeRouter } from "~/server/api/routers/stripe";
|
||||
|
||||
|
|
@ -9,7 +8,6 @@ import { stripeRouter } from "~/server/api/routers/stripe";
|
|||
* All routers added in /api/routers should be manually added here.
|
||||
*/
|
||||
export const appRouter = createTRPCRouter({
|
||||
example: exampleRouter,
|
||||
video: videoRouter,
|
||||
stripe: stripeRouter,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
import { z } from "zod";
|
||||
|
||||
import {
|
||||
createTRPCRouter,
|
||||
publicProcedure,
|
||||
protectedProcedure,
|
||||
} from "~/server/api/trpc";
|
||||
|
||||
export const exampleRouter = createTRPCRouter({
|
||||
hello: publicProcedure
|
||||
.input(z.object({ text: z.string() }))
|
||||
.query(({ input }) => {
|
||||
return {
|
||||
greeting: `Hello ${input.text}`,
|
||||
};
|
||||
}),
|
||||
|
||||
getAll: publicProcedure.query(({ ctx }) => {
|
||||
return ctx.prisma.video.findMany();
|
||||
}),
|
||||
|
||||
getSecretMessage: protectedProcedure.query(() => {
|
||||
return "you can now see this secret message!";
|
||||
}),
|
||||
});
|
||||
Loading…
Reference in a new issue