bml-cli/deletecontact.sh
2021-04-28 18:08:43 +05:00

18 lines
337 B
Bash

printf "Enter Contact ID: "
read -r CONATACT_ID
DELETESUCCESS=$(curl -s -b $COOKIE $BML_URL/contacts/$CONATACT_ID \
--data-raw _method=delete \
--compressed \
| jq -r .code)
if [ "$DELETESUCCESS" = "0" ]
then
echo Contact Deleted
source contactsmenu.sh
else
echo "${red}There was an error${reset}"
source contactsmenu.sh
fi