Add username to json members profiles

This commit is contained in:
poka 2021-03-31 15:09:02 +02:00
parent 67cd569684
commit 507fd996ad
1 changed files with 5 additions and 1 deletions

View File

@ -32,7 +32,9 @@ for i in $DATA_MBR; do
continue
else
isMbr='"isMember": true,'
resultWithMbr=$(echo "$result" | sed "s/\"geoPoint\": {/$isMbr \"geoPoint\": {/g")
userId=$(jaklis id -p $i | jq .idty.username)
userIdFormat="\"userId\": $userId,"
resultWithMbr=$(echo "$result" | sed "s/\"geoPoint\": {/$userIdFormat $isMbr \"geoPoint\": {/g")
echo "$resultWithMbr," >> $FILE
fi
done
@ -55,3 +57,5 @@ echo "}" >> $FILE
echo "]" >> $FILE
[[ -f $FINAL_LOCATION ]] && cat $FILE | jq . > $FINAL_LOCATION