Compare commits
2 Commits
15a09789a0
...
b274bf12d3
Author | SHA1 | Date | |
---|---|---|---|
b274bf12d3 | |||
868571f1a8 |
@ -1,5 +1,5 @@
|
||||
[tool.bumpversion]
|
||||
current_version = "1.3.47"
|
||||
current_version = "1.3.48"
|
||||
commit = true
|
||||
tag = true
|
||||
tag_name = "{new_version}"
|
||||
|
@ -70,9 +70,26 @@
|
||||
event.preventDefault();
|
||||
fetch('{{ url_for("send_test_notification") }}', {
|
||||
method: 'POST'
|
||||
}).then(response => response.json())
|
||||
.then(data => console.log(data.message))
|
||||
.catch(err => console.error('Error sending test notification:', err));
|
||||
}).then(response => {
|
||||
console.log('Response status:', response.status);
|
||||
console.log('Response headers:', response.headers);
|
||||
return response.text().then(text => {
|
||||
console.log('Response body:', text);
|
||||
try {
|
||||
return JSON.parse(text);
|
||||
} catch (e) {
|
||||
console.error('Failed to parse JSON:', e);
|
||||
throw new Error('Server returned non-JSON response');
|
||||
}
|
||||
});
|
||||
}).then(data => {
|
||||
console.log('Parsed data:', data);
|
||||
if (data.message) {
|
||||
console.log(data.message);
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('Error sending test notification:', err);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user