mirror of
https://github.com/documenso/documenso.git
synced 2025-11-26 14:34:05 +10:00
refactor: improve find envelopes endpoint implementation
This commit is contained in:
@@ -150,18 +150,6 @@ export const findEnvelopes = async ({
|
||||
[orderByColumn]: orderByDirection,
|
||||
},
|
||||
include: {
|
||||
envelopeItems: {
|
||||
select: {
|
||||
envelopeId: true,
|
||||
id: true,
|
||||
title: true,
|
||||
order: true,
|
||||
},
|
||||
orderBy: {
|
||||
order: 'asc',
|
||||
},
|
||||
},
|
||||
documentMeta: true,
|
||||
user: {
|
||||
select: {
|
||||
id: true,
|
||||
@@ -174,21 +162,12 @@ export const findEnvelopes = async ({
|
||||
id: 'asc',
|
||||
},
|
||||
},
|
||||
fields: true,
|
||||
team: {
|
||||
select: {
|
||||
id: true,
|
||||
url: true,
|
||||
},
|
||||
},
|
||||
directLink: {
|
||||
select: {
|
||||
directTemplateRecipientId: true,
|
||||
enabled: true,
|
||||
id: true,
|
||||
token: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
prisma.envelope.count({
|
||||
|
||||
Reference in New Issue
Block a user