export const fieldRouter = t.router({
find: t.procedure
.input(
z.object({
documentId: z.string(),
path: z.string(),
})
)
.query(async ({ input: { documentId, path } }) => {
return db.field.findFirst({
where: {
documentId,
path,
},
select: {
value: true,
},
})
}),
export const fieldRouter = t.router({
find: t.procedure
.input(
z.object({
documentId: z.string(),
path: z.string(),
})
)
.query(async ({ input: { documentId, path } }) => {
return db.field.findFirst({
where: {
documentId,
path,
},
select: {
value: true,
},
})
}),