From b6344843b99935502e59730ea65a2ed4bd20ea56 Mon Sep 17 00:00:00 2001 From: Aidan Jones Date: Wed, 25 Sep 2024 15:45:09 -0400 Subject: [PATCH] Delete unneeded DB queries --- .../common/workflow/db.ts | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/source/SIL.AppBuilder.Portal/common/workflow/db.ts b/source/SIL.AppBuilder.Portal/common/workflow/db.ts index ca364d6c8..d838c2b5b 100644 --- a/source/SIL.AppBuilder.Portal/common/workflow/db.ts +++ b/source/SIL.AppBuilder.Portal/common/workflow/db.ts @@ -243,49 +243,3 @@ export async function updateProductTransitions( }); } } - -export async function projectHasAuthors(ctx: WorkflowContext) { - return ( - ( - await prisma.products.findUnique({ - where: { - Id: ctx.productId - }, - select: { - Project: { - select: { - Authors: { - select: { - Id: true - } - } - } - } - } - }) - ).Project.Authors.length > 0 - ); -} - -export async function projectHasReviewers(ctx: WorkflowContext) { - return ( - ( - await prisma.products.findUnique({ - where: { - Id: ctx.productId - }, - select: { - Project: { - select: { - Reviewers: { - select: { - Id: true - } - } - } - } - } - }) - ).Project.Reviewers.length > 0 - ); -}