mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 22:57:11 -04:00
Fixed auth flow and added scaffolding vite config.
This commit is contained in:
parent
66fc735253
commit
04e4a5eee0
18 changed files with 226 additions and 37 deletions
|
@ -26,17 +26,14 @@
|
|||
body: JSON.stringify(data),
|
||||
}).then(response => {
|
||||
if (response.ok) {
|
||||
return response.json();
|
||||
}
|
||||
throw new Error('Network response was not ok.');
|
||||
}).then(data => {
|
||||
if (data.status === 'success') {
|
||||
window.location.href = data.redirect;
|
||||
if (response.redirected) {
|
||||
window.location.href = response.url;
|
||||
}
|
||||
} else {
|
||||
document.getElementById('error').innerText = "Error signing in";
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('There has been a problem with your fetch operation:', error);
|
||||
document.getElementById('error').innerText = "Error signing in"+error;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue