Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
4f83de33
Commit
4f83de33
authored
Sep 16, 2022
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use status URL when checking group existence.
This avoids issues with redirects.
parent
d2a34cc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
static/mainpage.js
static/mainpage.js
+3
-2
No files found.
static/mainpage.js
View file @
4f83de33
...
@@ -30,12 +30,13 @@ document.getElementById('groupform').onsubmit = async function(e) {
...
@@ -30,12 +30,13 @@ document.getElementById('groupform').onsubmit = async function(e) {
if
(
group
===
''
)
if
(
group
===
''
)
return
;
return
;
let
url
=
'
/group/
'
+
group
+
'
/
'
;
let
url
=
'
/group/
'
+
group
+
'
/
'
;
let
statusUrl
=
url
+
'
.status.json
'
;
try
{
try
{
groupinput
.
disabled
=
true
;
groupinput
.
disabled
=
true
;
button
.
disabled
=
true
;
button
.
disabled
=
true
;
try
{
try
{
let
resp
=
await
fetch
(
u
rl
,
{
let
resp
=
await
fetch
(
statusU
rl
,
{
method
:
'
HEAD
'
,
method
:
'
HEAD
'
,
});
});
if
(
!
resp
.
ok
)
{
if
(
!
resp
.
ok
)
{
...
@@ -46,7 +47,7 @@ document.getElementById('groupform').onsubmit = async function(e) {
...
@@ -46,7 +47,7 @@ document.getElementById('groupform').onsubmit = async function(e) {
return
;
return
;
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
displayError
(
`Cou
dl
n't connect:
${
e
.
toString
()}
`
);
displayError
(
`Cou
ld
n't connect:
${
e
.
toString
()}
`
);
return
;
return
;
}
}
}
finally
{
}
finally
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment