diff --git a/cli/template/extras/src/server/api/routers/post/with-auth-prisma.ts b/cli/template/extras/src/server/api/routers/post/with-auth-prisma.ts index 088d0dc13d..287f5805a0 100644 --- a/cli/template/extras/src/server/api/routers/post/with-auth-prisma.ts +++ b/cli/template/extras/src/server/api/routers/post/with-auth-prisma.ts @@ -29,7 +29,7 @@ export const postRouter = createTRPCRouter({ }); }), - getLatest: publicProcedure.query(async ({ ctx }) => { + getLatest: protectedProcedure.query(async ({ ctx }) => { const post = ctx.db.post.findFirst({ orderBy: { createdAt: "desc" }, where: { createdBy: { id: ctx.session.user.id } },