From d38ed023f1ac0b0c9d425973232c534b6eb65235 Mon Sep 17 00:00:00 2001 From: Bennett Borofka Date: Thu, 27 Jun 2024 18:11:00 -0500 Subject: [PATCH] Minor cleanup to web/script.js, web/index.html and comments to src/register-new-subscriber.js --- src/register-new-subscriber.js | 4 +++- web/index.html | 2 +- web/script.js | 4 ---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/register-new-subscriber.js b/src/register-new-subscriber.js index 729d36d..019a8a8 100644 --- a/src/register-new-subscriber.js +++ b/src/register-new-subscriber.js @@ -50,10 +50,11 @@ const setBuyerNotificationHandler = function (contactEmail) { exports.registerNewSubscriber = async (event) => { const { + // Accept form inputs from ../web/index.html regToken, companyName, contactPerson, contactPhone, contactEmail, } = JSON.parse(event.body); - // Validate the request + // Validate the request with form inputs from ../web/index.html if (regToken && companyName && contactPerson && contactPhone && contactEmail) { try { // Call resolveCustomer to validate the subscriber @@ -70,6 +71,7 @@ exports.registerNewSubscriber = async (event) => { const datetime = new Date().getTime().toString(); + // Write form inputs from ../web/index.html const dynamoDbParams = { TableName: newSubscribersTableName, Item: { diff --git a/web/index.html b/web/index.html index e82abf9..f8425f6 100644 --- a/web/index.html +++ b/web/index.html @@ -38,7 +38,7 @@

Please enter your contact details

-

© 2022

+

© 2024

diff --git a/web/script.js b/web/script.js index adb1d58..1fec3ef 100644 --- a/web/script.js +++ b/web/script.js @@ -60,7 +60,3 @@ const regToken = getUrlParameter('x-amzn-marketplace-token'); if (!regToken) { showAlert('danger', 'Registration Token Missing. Please go to AWS Marketplace and follow the instructions to set up your account!'); } - -if (!baseUrl) { - showAlert('danger', 'Please update the baseUrl'); -}