Fix GVA request

This commit is contained in:
poka 2021-02-26 06:51:32 +01:00
parent f18a98f563
commit ba0f91404c
1 changed files with 12 additions and 20 deletions

View File

@ -12,8 +12,6 @@ node=$(cut -d '/' -f3 <<<"$DUNITER")
work() { work() {
for i in $wallets; do for i in $wallets; do
if [[ $1 == "members" ]]; then
exec() { exec() {
jsonResult=$($JAKLIS idBalance -p $i 2>/dev/null) jsonResult=$($JAKLIS idBalance -p $i 2>/dev/null)
} }
@ -24,18 +22,12 @@ work() {
balance=$(echo "$jsonResult" | jq -r '.balance') balance=$(echo "$jsonResult" | jq -r '.balance')
username=$(echo "$jsonResult" | jq -r '.username') username=$(echo "$jsonResult" | jq -r '.username')
formatedBalance=$(printf "%-10s | %-45s | %-1s" $balance $i $username) formatedBalance=$(printf "%-10s | %-45s | %-1s" $balance $i $username)
htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td>$username</td></tr>"
if [[ $1 == "members" ]]; then
htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td><b>$username</b></td></tr>"
unset username unset username
else else
exec() { htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td>$username</td></tr>"
balance=$($JAKLIS id -p $i 2>/dev/null)
}
exec
while [[ $? == 1 ]]; do echo "Erreur $k: $i"; ((k++)); exec; done
unset k
formatedBalance=$(printf "%-10s | %-45s" $balance $i)
htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td> </td></tr>"
fi fi
unset balance unset balance