fix blog not using updated db schema

This commit is contained in:
Alex Frantz
2024-03-21 01:45:58 -04:00
parent 3a9690d2ba
commit 2cb6925ab2
5 changed files with 8 additions and 6 deletions
+4 -2
View File
@@ -28,7 +28,7 @@ export const blogRouter = createTRPCRouter({
}),
delete: protectedProcedure
.input(
z.string().min(1)
z.number().min(1)
)
.mutation(async ({ctx, input}) => {
return ctx.db.blogPost.delete({
@@ -38,7 +38,9 @@ export const blogRouter = createTRPCRouter({
})
}),
getOne: publicProcedure
.input(String)
.input(
z.number()
)
.query(({ ctx, input }) => {
return ctx.db.blogPost.findFirst({
where: { id: input },
+1 -1
View File
@@ -30,7 +30,7 @@ export const postRouter = createTRPCRouter({
delete: protectedProcedure
.input(
z.string().min(1)
z.number().min(1)
)
.mutation(async ({ctx, input}) => {
return ctx.db.post.delete({