From 414d69493c9a0622f2658b72af0b98cada0ed0bc Mon Sep 17 00:00:00 2001 From: MarconLP <13001502+MarconLP@users.noreply.github.com> Date: Fri, 21 Apr 2023 23:38:29 +0200 Subject: [PATCH] remove example router --- src/server/api/root.ts | 2 -- src/server/api/routers/example.ts | 25 ------------------------- 2 files changed, 27 deletions(-) delete mode 100644 src/server/api/routers/example.ts diff --git a/src/server/api/root.ts b/src/server/api/root.ts index 1f6bea9..ebed236 100644 --- a/src/server/api/root.ts +++ b/src/server/api/root.ts @@ -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, }); diff --git a/src/server/api/routers/example.ts b/src/server/api/routers/example.ts deleted file mode 100644 index 5378607..0000000 --- a/src/server/api/routers/example.ts +++ /dev/null @@ -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!"; - }), -});