diff --git a/backend/prisma/seed-products.ts b/backend/prisma/seed-products.ts index 7075b76a..c0f52a19 100644 --- a/backend/prisma/seed-products.ts +++ b/backend/prisma/seed-products.ts @@ -372,10 +372,11 @@ export async function main() { .split(/[،,]/) .map((s: string) => s.trim()) .filter(Boolean); - const uniqueIngredients = Array.from( - new Set(parts.map((ing: string) => ing.substring(0, 150))), + const uniqueIngredients: string[] = Array.from( + new Set(parts.map((ing: string) => ing.substring(0, 150))), ).slice(0, 20); - for (const truncated of uniqueIngredients) { + for (const item of uniqueIngredients) { + const truncated: string = String(item); if (truncated.length > 0) { try { await prisma.productIngredient.create({ @@ -392,10 +393,11 @@ export async function main() { await prisma.productSymptom.deleteMany({ where: { productId: product.id }, }); - const symptomsList = Array.from( - new Set(PRODUCT_SYMPTOMS_MAP[baseSlug] || []), + const symptomsList: string[] = Array.from( + new Set(PRODUCT_SYMPTOMS_MAP[baseSlug] || []), ); - for (const sym of symptomsList) { + for (const item of symptomsList) { + const sym: string = String(item); try { await prisma.productSymptom.create({ data: { productId: product.id, symptom: sym },