remove type from link mutation

This commit is contained in:
alex 3
2023-11-05 23:56:56 -05:00
parent 50bca71a3f
commit 48fb8f644f
+2 -4
View File
@@ -10,16 +10,14 @@ export const linksRouter = createTRPCRouter({
.input( .input(
z.object({ z.object({
name: z.string().min(1), name: z.string().min(1),
url: z.string().min(1), url: z.string().min(1)
type: z.string().min(1)
}) })
) )
.mutation(async ({ctx, input}) => { .mutation(async ({ctx, input}) => {
return ctx.db.socialLink.create({ return ctx.db.socialLink.create({
data: { data: {
name: input.name, name: input.name,
url: input.url, url: input.url
type: input.type
} }
}) })
}), }),