mirror of
https://github.com/jech/galene.git
synced 2024-11-09 18:25:58 +01:00
Use status URL when checking group existence.
This avoids issues with redirects.
This commit is contained in:
parent
d2a34cc4b5
commit
4f83de3335
1 changed files with 3 additions and 2 deletions
|
@ -30,12 +30,13 @@ document.getElementById('groupform').onsubmit = async function(e) {
|
|||
if(group === '')
|
||||
return;
|
||||
let url = '/group/' + group + '/';
|
||||
let statusUrl = url + '.status.json';
|
||||
|
||||
try {
|
||||
groupinput.disabled = true;
|
||||
button.disabled = true;
|
||||
try {
|
||||
let resp = await fetch(url, {
|
||||
let resp = await fetch(statusUrl, {
|
||||
method: 'HEAD',
|
||||
});
|
||||
if(!resp.ok) {
|
||||
|
@ -46,7 +47,7 @@ document.getElementById('groupform').onsubmit = async function(e) {
|
|||
return;
|
||||
}
|
||||
} catch(e) {
|
||||
displayError(`Coudln't connect: ${e.toString()}`);
|
||||
displayError(`Couldn't connect: ${e.toString()}`);
|
||||
return;
|
||||
}
|
||||
} finally {
|
||||
|
|
Loading…
Reference in a new issue