Compare commits

..

No commits in common. "b446b00fc6976958567ab8ff4c5376de9762596d" and "d40f98f5e4d5f45db8b01b25c135d29bcc44c180" have entirely different histories.

3 changed files with 4 additions and 12 deletions

View File

@ -1,5 +1,5 @@
[tool.bumpversion] [tool.bumpversion]
current_version = "1.3.26" current_version = "1.3.25"
commit = true commit = true
tag = true tag = true
tag_name = "{new_version}" tag_name = "{new_version}"

View File

@ -1 +1 @@
1.3.26 1.3.25

View File

@ -74,10 +74,7 @@
} }
function subscribeUser(registration) { function subscribeUser(registration) {
let baseUrl = '{{ config.BASE_URL }}'.replace(/\/$/, ""); // Remove trailing slash if present const baseUrl = '{{ config.BASE_URL }}'.replace(/\/$/, ""); // Remove trailing slash if present
if (window.location.protocol === 'https:') {
baseUrl = baseUrl.replace(/^http:/, 'https:');
}
fetch(`${baseUrl}/vapid-public-key`) fetch(`${baseUrl}/vapid-public-key`)
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
@ -91,16 +88,11 @@
}).catch(function(err) { }).catch(function(err) {
console.log('Failed to subscribe the user: ', err); console.log('Failed to subscribe the user: ', err);
}); });
}).catch(function(err) {
console.error('Failed to fetch vapid key:', err);
}); });
} }
function saveSubscription(subscription) { function saveSubscription(subscription) {
let baseUrl = '{{ config.BASE_URL }}'.replace(/\/$/, ""); // Remove trailing slash if present const baseUrl = '{{ config.BASE_URL }}'.replace(/\/$/, ""); // Remove trailing slash if present
if (window.location.protocol === 'https:') {
baseUrl = baseUrl.replace(/^http:/, 'https:');
}
fetch(`${baseUrl}/save-subscription`, { fetch(`${baseUrl}/save-subscription`, {
method: 'POST', method: 'POST',
headers: { headers: {