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) ─────────
|
// ── 3. GET Master Products & Variants List (For Selection Dropdown) ─────────
|
||||||
.get("/products-list", async () => {
|
.get("/products-list", async () => {
|
||||||
const products = await prisma.product.findMany({
|
const products = await prisma.product.findMany({
|
||||||
|
where: { isDeleted: false },
|
||||||
include: {
|
include: {
|
||||||
category: { select: { id: true, name: true } },
|
category: { select: { id: true, name: true } },
|
||||||
brand: { select: { id: true, name: true } },
|
brand: { select: { id: true, name: true } },
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export const categoriesRoute = new Elysia({ prefix: "/categories" })
|
|||||||
include: {
|
include: {
|
||||||
translations: true,
|
translations: true,
|
||||||
_count: {
|
_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) ────────────
|
// ── 1. GET Master Product Variants (For mapping dropdown/picker) ────────────
|
||||||
.get("/marketplace-products/master-variants", async () => {
|
.get("/marketplace-products/master-variants", async () => {
|
||||||
const variants = await prisma.productVariant.findMany({
|
const variants = await prisma.productVariant.findMany({
|
||||||
|
where: { product: { isDeleted: false } },
|
||||||
include: {
|
include: {
|
||||||
product: {
|
product: {
|
||||||
select: {
|
select: {
|
||||||
|
|||||||
Reference in new issue
Block a user