🚸 Improve UX on create user page

This commit is contained in:
Manuel
2023-07-29 20:12:49 +02:00
parent e273c830b4
commit ed23e388f9
6 changed files with 111 additions and 24 deletions

View File

@@ -185,4 +185,18 @@ export const userRouter = createTRPCRouter({
},
});
}),
deleteUser: publicProcedure
.input(
z.object({
userId: z.string(),
})
)
.mutation(async ({ ctx, input }) => {
await ctx.prisma.user.delete({
where: {
id: input.userId,
},
});
}),
});