medusa-import-product-plugin 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,10 +79,10 @@ function ImportPage() {
79
79
  try {
80
80
  const form = new FormData();
81
81
  form.append("file", file);
82
- const res = await fetch("/admin/import", {
82
+ const baseUrl = __BACKEND_URL__ ?? "";
83
+ const res = await fetch(`${baseUrl}/admin/import`, {
83
84
  method: "POST",
84
- body: form,
85
- credentials: "include"
85
+ body: form
86
86
  });
87
87
  if (!res.ok) {
88
88
  const err = await res.json().catch(() => ({ error: "Upload failed" }));
@@ -76,10 +76,10 @@ function ImportPage() {
76
76
  try {
77
77
  const form = new FormData();
78
78
  form.append("file", file);
79
- const res = await fetch("/admin/import", {
79
+ const baseUrl = __BACKEND_URL__ ?? "";
80
+ const res = await fetch(`${baseUrl}/admin/import`, {
80
81
  method: "POST",
81
- body: form,
82
- credentials: "include"
82
+ body: form
83
83
  });
84
84
  if (!res.ok) {
85
85
  const err = await res.json().catch(() => ({ error: "Upload failed" }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "medusa-import-product-plugin",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "A starter for Medusa plugins.",
5
5
  "author": "Medusa (https://medusajs.com)",
6
6
  "license": "MIT",