Skip to content

Commit

Permalink
Update post.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge authored Jan 16, 2024
1 parent e554218 commit cea7837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/src/router/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { CreatePostSchema } from "@acme/validators";
import { createTRPCRouter, protectedProcedure, publicProcedure } from "../trpc";

export const postRouter = createTRPCRouter({
all: protectedProcedure.query(({ ctx }) => {
all: publicProcedure.query(({ ctx }) => {
// return ctx.db.select().from(schema.post).orderBy(desc(schema.post.id));
return ctx.db.query.post.findMany({
orderBy: desc(schema.post.id),
Expand Down

0 comments on commit cea7837

Please sign in to comment.