Await logging response

master
Keith Irwin 2022-10-03 12:51:40 -06:00
parent aece72bd25
commit caa4777994
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
2 changed files with 2 additions and 2 deletions

View File

@ -44,4 +44,4 @@ while IFS= read -r line; do
*) printf 'ERROR! Invalid format for %s: %s\n' "${0}" "${format}" >>"${LOGFILE}"
exit 5;
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

View File

@ -35,7 +35,7 @@ function PeerList() {
if (res.status) console.log(res.status)
alert('Failed to contact API and load peers list. Check your wireguard connection. ')
} else {
console.log(res.text())
console.log(await res.text())
let user; try {
user = await res.json()
} catch (err) {