Await logging response
parent
aece72bd25
commit
caa4777994
|
@ -44,4 +44,4 @@ while IFS= read -r line; do
|
||||||
*) printf 'ERROR! Invalid format for %s: %s\n' "${0}" "${format}" >>"${LOGFILE}"
|
*) printf 'ERROR! Invalid format for %s: %s\n' "${0}" "${format}" >>"${LOGFILE}"
|
||||||
exit 5;
|
exit 5;
|
||||||
esac
|
esac
|
||||||
done | sed 's/\n//g' | sed 's/,$//' # Remove trailing comma and newline
|
done | sed 's/\n//g' | sed 's/,$//' # Remove trailing comma and newlines
|
||||||
|
|
|
@ -35,7 +35,7 @@ function PeerList() {
|
||||||
if (res.status) console.log(res.status)
|
if (res.status) console.log(res.status)
|
||||||
alert('Failed to contact API and load peers list. Check your wireguard connection. ')
|
alert('Failed to contact API and load peers list. Check your wireguard connection. ')
|
||||||
} else {
|
} else {
|
||||||
console.log(res.text())
|
console.log(await res.text())
|
||||||
let user; try {
|
let user; try {
|
||||||
user = await res.json()
|
user = await res.json()
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue