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 b602dd5776..8760fdfd82 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 @@ -26,7 +26,7 @@ export const postRouter = createTRPCRouter({ }); }), - getLatest: protectedProcedure.query(async ({ ctx }) => { + getLatest: publicProcedure.query(async ({ ctx }) => { const post = await ctx.db.post.findFirst({ orderBy: { createdAt: "desc" }, where: { createdBy: { id: ctx.session.user.id } }, diff --git a/cli/template/extras/src/server/api/routers/post/with-auth.ts b/cli/template/extras/src/server/api/routers/post/with-auth.ts index 199b617fe6..632ccfb7b3 100644 --- a/cli/template/extras/src/server/api/routers/post/with-auth.ts +++ b/cli/template/extras/src/server/api/routers/post/with-auth.ts @@ -27,7 +27,7 @@ export const postRouter = createTRPCRouter({ return post; }), - getLatest: protectedProcedure.query(() => { + getLatest: publicProcedure.query(() => { return post; }),