Browse Source

fix create product in seed script

Shahed Nasser 1 năm trước cách đây
mục cha
commit
0bd912d0ca
1 tập tin đã thay đổi với 18 bổ sung0 xóa
  1. 18 0
      src/scripts/seed.ts

+ 18 - 0
src/scripts/seed.ts

@@ -512,6 +512,12 @@ export default async function seedDemoData({ container }: ExecArgs) {
               },
             ],
           },
+        ],
+      },
+    });
+    await createProductsWorkflow(container).run({
+      input: {
+        products: [
           {
             title: "Medusa Sweatshirt",
             category_ids: [categories["Sweatshirts"]],
@@ -614,6 +620,12 @@ export default async function seedDemoData({ container }: ExecArgs) {
               },
             ],
           },
+        ],
+      },
+    });
+    await createProductsWorkflow(container).run({
+      input: {
+        products: [
           {
             title: "Medusa Sweatpants",
             category_ids: [categories["Pants"]],
@@ -716,6 +728,12 @@ export default async function seedDemoData({ container }: ExecArgs) {
               },
             ],
           },
+        ],
+      },
+    });
+    await createProductsWorkflow(container).run({
+      input: {
+        products: [
           {
             title: "Medusa Shorts",
             category_ids: [categories["Merch"]],