submitIdeaNote: t.procedure
.input(
z.object({
message: z.string(),
ideaId: z.string(),
})
)
.mutation(async ({ ctx, input }) => {
if (!input || !input.message) {
return { error: "Missing title or description" };
}
return await ctx.prisma.ideaNote.create({
data: {
text: input.message,
ideaId: input.ideaId,
},
});
}),
submitIdeaNote: t.procedure
.input(
z.object({
message: z.string(),
ideaId: z.string(),
})
)
.mutation(async ({ ctx, input }) => {
if (!input || !input.message) {
return { error: "Missing title or description" };
}
return await ctx.prisma.ideaNote.create({
data: {
text: input.message,
ideaId: input.ideaId,
},
});
}),