Skip to content

Commit 6302b6d

Browse files
committed
cleanup and debug
1 parent 7c7eb0b commit 6302b6d

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/js/08-feedback.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,13 @@
4545

4646
feedbackFormData.append('feedback-option', feedbackFormOptionButtonSelected.value)
4747

48-
console.log(feedbackFormData)
49-
5048
fetch('/', {
5149
method: 'POST',
5250
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
5351
body: new URLSearchParams(feedbackFormData).toString(),
5452
})
55-
.then(() => console.log('Form successfully submitted'))
56-
.catch((error) => alert(error))
53+
.then((response) => console.log('Form successfully submitted. DEBUG: ', response))
54+
.catch((error) => console.error('ERROR: ', error))
5755

5856
feedbackFormSubmitButton.innerText = 'Submitted'
5957
feedbackFormSubmitButton.disabled = true

0 commit comments

Comments
 (0)