This commit is contained in:
David Nguyen
2025-02-05 00:57:00 +11:00
parent 540cc5bfc1
commit 1057ae6d2a
105 changed files with 379 additions and 357 deletions

View File

@ -40,7 +40,7 @@ export const findDocuments = async ({
orderBy,
period,
senderIds,
query,
query = '',
}: FindDocumentsOptions) => {
const user = await prisma.user.findFirstOrThrow({
where: {
@ -226,6 +226,8 @@ export const findDocuments = async ({
};
}
console.log(JSON.stringify(whereClause, null, 2));
const [data, count] = await Promise.all([
prisma.document.findMany({
where: whereClause,