Fixed bad control statements
parent
b834cc4275
commit
f1c4685fa2
|
@ -21,11 +21,13 @@ function PeerList() {
|
|||
self.getUser = async () => {
|
||||
let res; try {
|
||||
res = await fetch(`${API_URL}/`)
|
||||
} catch (err) || (!res.ok)
|
||||
} catch (err) {
|
||||
if (err) console.error(err)
|
||||
alert('Failed to contact API and load peers list. Check your wireguard connection. ')
|
||||
} if (!res.ok) {
|
||||
if (res.status) console.log(res.status)
|
||||
alert('Failed to contact API and load peers list. Check your wireguard connection. ')
|
||||
else {
|
||||
} else {
|
||||
let user; try {
|
||||
user = await res.json()
|
||||
} catch (err) {
|
||||
|
|
Loading…
Reference in New Issue