x
This commit is contained in:
1 parent
049203de29
commit
44f731839f
3 files changed
+3
-1
No files matched your search
@@ -662,6 +662,7 @@ export const businessAnalyticsRoute = new Elysia({ prefix: "/business-analytics"
|
||||
// ── 3. GET Master Products & Variants List (For Selection Dropdown) ─────────
|
||||
.get("/products-list", async () => {
|
||||
const products = await prisma.product.findMany({
|
||||
where: { isDeleted: false },
|
||||
include: {
|
||||
category: { select: { id: true, name: true } },
|
||||
brand: { select: { id: true, name: true } },
|
||||
|
||||
@@ -25,7 +25,7 @@ export const categoriesRoute = new Elysia({ prefix: "/categories" })
|
||||
include: {
|
||||
translations: true,
|
||||
_count: {
|
||||
select: { products: true },
|
||||
select: { products: { where: { isDeleted: false } } },
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -6,6 +6,7 @@ export const toolsRoute = new Elysia({ prefix: "/tools" })
|
||||
// ── 1. GET Master Product Variants (For mapping dropdown/picker) ────────────
|
||||
.get("/marketplace-products/master-variants", async () => {
|
||||
const variants = await prisma.productVariant.findMany({
|
||||
where: { product: { isDeleted: false } },
|
||||
include: {
|
||||
product: {
|
||||
select: {
|
||||
|
||||
Reference in new issue
Block a user