mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
perf(web, lib): do not await inside promise statements (#692)
This commit is contained in:
@ -43,11 +43,11 @@ export default async function DocumentPage({ params }: DocumentPageProps) {
|
||||
const { documentData } = document;
|
||||
|
||||
const [recipients, fields] = await Promise.all([
|
||||
await getRecipientsForDocument({
|
||||
getRecipientsForDocument({
|
||||
documentId,
|
||||
userId: user.id,
|
||||
}),
|
||||
await getFieldsForDocument({
|
||||
getFieldsForDocument({
|
||||
documentId,
|
||||
userId: user.id,
|
||||
}),
|
||||
|
||||
@ -32,7 +32,7 @@ export const findUsers = async ({
|
||||
});
|
||||
|
||||
const [users, count] = await Promise.all([
|
||||
await prisma.user.findMany({
|
||||
prisma.user.findMany({
|
||||
include: {
|
||||
Subscription: true,
|
||||
Document: {
|
||||
@ -45,7 +45,7 @@ export const findUsers = async ({
|
||||
skip: Math.max(page - 1, 0) * perPage,
|
||||
take: perPage,
|
||||
}),
|
||||
await prisma.user.count({
|
||||
prisma.user.count({
|
||||
where: whereClause,
|
||||
}),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user