summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorertopogo <erwin.t.pombett@gmail.com>2026-01-25 02:14:27 +0100
committerertopogo <erwin.t.pombett@gmail.com>2026-01-25 02:14:27 +0100
commitcbbaf2e94041e62bcdb033bc5d8df0f0068f9e8d (patch)
tree8c5f05cedd6a1ec6ac05f21bf43fe99ad5a37a79 /backend
parent807aef505023ba3aca5c86db0e4d7b6d22f7b0b0 (diff)
ajout d'un fichier seed
Diffstat (limited to 'backend')
-rw-r--r--backend/data/seed.json62
-rw-r--r--backend/scripts/patch-medusa.js11
2 files changed, 62 insertions, 11 deletions
diff --git a/backend/data/seed.json b/backend/data/seed.json
new file mode 100644
index 0000000..2c6b906
--- /dev/null
+++ b/backend/data/seed.json
@@ -0,0 +1,62 @@
+{
+ "store": {
+ "currencies": ["eur"]
+ },
+ "users": [
+ {
+ "email": "admin@lsb.local",
+ "password": "supersecret"
+ }
+ ],
+ "regions": [
+ {
+ "id": "fr",
+ "name": "France",
+ "currency_code": "eur",
+ "tax_rate": 0,
+ "payment_providers": ["manual"],
+ "fulfillment_providers": ["manual"],
+ "countries": ["fr"]
+ }
+ ],
+ "shipping_options": [
+ {
+ "name": "Standard",
+ "region_id": "fr",
+ "provider_id": "manual",
+ "price_type": "flat_rate",
+ "amount": 500
+ }
+ ],
+ "products": [
+ {
+ "title": "Savon Lavande",
+ "handle": "savon-lavande",
+ "description": "Savon artisanal a la lavande.",
+ "thumbnail": "https://via.placeholder.com/600x600.png?text=Savon+Lavande",
+ "options": [
+ {
+ "title": "Taille"
+ }
+ ],
+ "variants": [
+ {
+ "title": "100g",
+ "prices": [
+ {
+ "currency_code": "eur",
+ "amount": 650
+ }
+ ],
+ "options": [
+ {
+ "value": "100g"
+ }
+ ],
+ "inventory_quantity": 100,
+ "manage_inventory": true
+ }
+ ]
+ }
+ ]
+}
diff --git a/backend/scripts/patch-medusa.js b/backend/scripts/patch-medusa.js
index 82d6333..a3b7b0f 100644
--- a/backend/scripts/patch-medusa.js
+++ b/backend/scripts/patch-medusa.js
@@ -42,17 +42,6 @@ const taxProviderPath = path.join(
"tax-provider.js"
);
-const fulfillmentPath = path.join(
- __dirname,
- "..",
- "node_modules",
- "@medusajs",
- "medusa",
- "dist",
- "services",
- "fulfillment-provider.js"
-);
-
const targets = [
{
label: "payment-provider",