Fixed issue with accounts with multiple profiles

This commit is contained in:
Shihaam Abdul Rahman 2021-05-10 20:00:04 +05:00
parent 7a08cec336
commit 0b20e0d447

View File

@ -1,5 +1,11 @@
#Requesting for User profile after login and regex to grap the Full name
curl -s -b $COOKIE $BML_URL/profile > /dev/null
REQPRO=$(curl -s -b $COOKIE $BML_URL/profile)
PERSONALPROFILE=$(echo $REQPRO \
| jq -r '.payload | .profile | .[] | .profile' \
| head -n 1)
curl -s -b $COOKIE $BML_URL/profile \
--data-raw profile=$PERSONALPROFILE \
--compressed > /dev/null
USERINFO=$(curl -s -b $COOKIE $BML_URL/userinfo \
| jq -r '.["payload"] | .["user"]')