bigckck commited on
Commit
32b85bb
·
verified ·
1 Parent(s): 9adcb46

the submission does not work

Browse files
Files changed (1) hide show
  1. osint.html +10 -9
osint.html CHANGED
@@ -47,26 +47,27 @@
47
  email: document.getElementById('email').value || null,
48
  address: document.getElementById('address').value || null
49
  };
50
-
51
  fetch('https://primary-production-52f55.up.railway.app/webhook/14ba7496-51b2-49f7-b330-f69309bb414d', {
52
  method: 'POST',
 
53
  headers: {
54
  'Content-Type': 'application/json',
 
55
  },
56
  body: JSON.stringify(formData)
57
  })
58
- .then(response => {
59
- if (response.ok) {
60
- alert('Data submitted successfully!');
61
- document.getElementById('osintForm').reset();
62
- } else {
63
- throw new Error('Submission failed');
64
- }
65
  })
 
 
 
 
66
  .catch(error => {
67
  alert('Error submitting data: ' + error.message);
 
68
  });
69
- });
70
  </script>
71
  </body>
72
  </html>
 
47
  email: document.getElementById('email').value || null,
48
  address: document.getElementById('address').value || null
49
  };
 
50
  fetch('https://primary-production-52f55.up.railway.app/webhook/14ba7496-51b2-49f7-b330-f69309bb414d', {
51
  method: 'POST',
52
+ mode: 'cors',
53
  headers: {
54
  'Content-Type': 'application/json',
55
+ 'Accept': 'application/json'
56
  },
57
  body: JSON.stringify(formData)
58
  })
59
+ .then(response => {
60
+ return response.json();
 
 
 
 
 
61
  })
62
+ .then(data => {
63
+ alert('Data submitted successfully!');
64
+ document.getElementById('osintForm').reset();
65
+ })
66
  .catch(error => {
67
  alert('Error submitting data: ' + error.message);
68
+ console.error('Error:', error);
69
  });
70
+ });
71
  </script>
72
  </body>
73
  </html>