Skip to content

Commit

Permalink
fix: use protected trpc procedure instead of public one
Browse files Browse the repository at this point in the history
  • Loading branch information
datasalaryman committed Jul 15, 2024
1 parent da2a46c commit 24e1f84
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 } },
Expand Down

0 comments on commit 24e1f84

Please sign in to comment.