export const getProjects = publicProcedure
.input(z.object({ publicKey: z.string() }))
.mutation(async ({ input, ctx: { prisma } }) => {
const projects = await prisma.project.findMany({
where: {
client: {
public_key: input.publicKey,
},
},
select: {
name: true,
},
});
return projects;
});
export const getProjects = publicProcedure
.input(z.object({ publicKey: z.string() }))
.mutation(async ({ input, ctx: { prisma } }) => {
const projects = await prisma.project.findMany({
where: {
client: {
public_key: input.publicKey,
},
},
select: {
name: true,
},
});
return projects;
});