Skip to content

Commit

Permalink
Merge pull request #79 from cloudbennett/master
Browse files Browse the repository at this point in the history
Minor cleanup to web/script.js, web/index.html and comments to src/re…
  • Loading branch information
JoseRolles authored Jun 28, 2024
2 parents a9ae45a + d38ed02 commit 19d8bed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/register-new-subscriber.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1 class="h3 mb-3 font-weight-normal">Please enter your contact details</h1>


<button class="btn btn-lg btn-primary btn-block" type="submit">Register</button>
<p class="mt-5 mb-3 text-muted">&copy; 2022</p>
<p class="mt-5 mb-3 text-muted">&copy; 2024</p>
</form>
</div>

Expand Down
4 changes: 0 additions & 4 deletions web/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

0 comments on commit 19d8bed

Please sign in to comment.