remove example router

This commit is contained in:
MarconLP 2023-04-21 23:38:29 +02:00
parent f09b46558f
commit 414d69493c
No known key found for this signature in database
GPG key ID: A08A9C8B623F5EA5
2 changed files with 0 additions and 27 deletions

View file

@ -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,
});

View file

@ -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!";
}),
});