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.
Files changed (2) hide show
  1. package/index.js +10 -17
  2. 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
- let contactInfo = "";
251
- if (fields.includes("email")) {
250
+ if (fields.includes("email")) {
252
251
  formData.email = form.querySelector("input[name='email']").value;
253
- contactInfo = formData.email;
254
- }
255
- if (fields.includes("firstName")) {
252
+ }
253
+ if (fields.includes("firstName")) {
256
254
  formData.firstName = form.querySelector("input[name='firstName']").value;
257
- }
258
- if (fields.includes("lastName")) {
255
+ }
256
+ if (fields.includes("lastName")) {
259
257
  formData.lastName = form.querySelector("input[name='lastName']").value;
260
- }
261
- if (fields.includes("mobile")) {
258
+ }
259
+ if (fields.includes("mobile")) {
262
260
  formData.mobile = form.querySelector("input[name='mobile']").value;
263
- formData.isMobile = true;
264
- contactInfo = formData.mobile;
265
- }
261
+ }
266
262
 
267
- let url = `https://api.au-aws.thewishlist.io/services/wsservice/api/wishlist/items/customerInterest/${contactInfo}`;
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notify-me-wl",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"