notify-me-wl 1.2.0 → 1.2.1
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.
- package/index.js +10 -17
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -245,29 +245,22 @@ document.addEventListener("DOMContentLoaded", function () {
|
|
|
245
245
|
const formData = {
|
|
246
246
|
productRef: productData.id,
|
|
247
247
|
variantRef: selectedVariant.id,
|
|
248
|
-
|
|
248
|
+
};
|
|
249
249
|
|
|
250
|
-
|
|
251
|
-
if (fields.includes("email")) {
|
|
250
|
+
if (fields.includes("email")) {
|
|
252
251
|
formData.email = form.querySelector("input[name='email']").value;
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
if (fields.includes("firstName")) {
|
|
252
|
+
}
|
|
253
|
+
if (fields.includes("firstName")) {
|
|
256
254
|
formData.firstName = form.querySelector("input[name='firstName']").value;
|
|
257
|
-
|
|
258
|
-
|
|
255
|
+
}
|
|
256
|
+
if (fields.includes("lastName")) {
|
|
259
257
|
formData.lastName = form.querySelector("input[name='lastName']").value;
|
|
260
|
-
|
|
261
|
-
|
|
258
|
+
}
|
|
259
|
+
if (fields.includes("mobile")) {
|
|
262
260
|
formData.mobile = form.querySelector("input[name='mobile']").value;
|
|
263
|
-
|
|
264
|
-
contactInfo = formData.mobile;
|
|
265
|
-
}
|
|
261
|
+
}
|
|
266
262
|
|
|
267
|
-
|
|
268
|
-
if (formData.isMobile) {
|
|
269
|
-
url += "?isMobile=true";
|
|
270
|
-
}
|
|
263
|
+
let url = `https://api.au-aws.thewishlist.io/services/wsservice/api/wishlist/items/customerInterest`;
|
|
271
264
|
|
|
272
265
|
fetch(url, {
|
|
273
266
|
method: "POST",
|