From ec1752ccd37f0c8592b193cc81a6c7c95cfcb5c0 Mon Sep 17 00:00:00 2001 From: nguyandy Date: Thu, 11 Jul 2024 11:34:09 -0400 Subject: [PATCH] update form submission to use new endpoint --- public/js/main.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/public/js/main.js b/public/js/main.js index 00f20d8..4cb33f3 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -79,8 +79,15 @@ $(function() { }); if (valid) $.ajax({ - url : 'https://oceansMap2.asascience.com/?SiteID=1&Name=' + $('#feedback-name').val() + '&Email=' + $('#feedback-email').val() + '&Comment=' + $('#feedback-comment').val(), - type : 'POST', + url: 'https://ioos.us/api/feedback', + type: 'POST', + contentType: 'application/json', + data: JSON.stringify({ + website: 'https://ioos.us', + body: $('#feedback-comment').val(), + name: $('#feedback-name').val(), + email: $('#feedback-email').val() + }), success: function (data) { alert('Feedback Submitted'); $('#feedbackForm').modal('hide');