Skip to content

Commit

Permalink
Delete unneeded DB queries
Browse files Browse the repository at this point in the history
  • Loading branch information
FyreByrd committed Sep 25, 2024
1 parent dd262bf commit b634484
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions source/SIL.AppBuilder.Portal/common/workflow/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

0 comments on commit b634484

Please sign in to comment.