mirror of
https://github.com/documenso/documenso.git
synced 2026-08-26 08:12:27 +10:00
refactor(trpc): use ts-pattern for envelope document-data resolution (#3222)
This commit is contained in:
@@ -39,8 +39,8 @@ export const signEnvelopeFieldRoute = procedure
|
||||
const field = await prisma.field.findFirst({
|
||||
where: {
|
||||
id: fieldId,
|
||||
recipient: {
|
||||
...(recipient.role === RecipientRole.ASSISTANT
|
||||
recipient:
|
||||
recipient.role === RecipientRole.ASSISTANT
|
||||
? {
|
||||
signingStatus: {
|
||||
not: SigningStatus.SIGNED,
|
||||
@@ -52,8 +52,7 @@ export const signEnvelopeFieldRoute = procedure
|
||||
}
|
||||
: {
|
||||
id: recipient.id,
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
include: {
|
||||
envelope: {
|
||||
|
||||
Reference in New Issue
Block a user