refactor: simplify optional checks and boolean coercion in services

This commit is contained in:
2026-05-12 00:46:41 +02:00
parent a7b547a92d
commit 6f16d26a8e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ export const ItemService = {
}): Promise<Item[]> => {
return prisma.item.findMany({
include: {
category: opts?.includeCategory ? true : false,
category: !!opts?.includeCategory,
assets: opts?.includeAssets
? { select: { id: true, serialNumber: true, status: true } }
: false,