2023-05-01 14:00:17 +00:00
|
|
|
#!/bin/zsh
|
|
|
|
echo id
|
|
|
|
host=https://api.syui.ai
|
|
|
|
token=`cat ~/.config/atr/api_card.json|jq -r .token`
|
|
|
|
pass=`cat ~/.config/atr/api_card.json|jq -r .pass`
|
|
|
|
if [ -z "$1" ];then
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
id=$1
|
2023-11-03 02:24:42 +00:00
|
|
|
s=$2
|
|
|
|
if [ -n "$2" ];then
|
|
|
|
s=$2
|
|
|
|
else
|
|
|
|
s=true
|
|
|
|
fi
|
|
|
|
|
2024-02-05 22:21:38 +00:00
|
|
|
token=`cat ~/.config/atr/api_card.json|jq -r .token`
|
2023-11-03 02:24:42 +00:00
|
|
|
curl -X PATCH -H "Content-Type: application/json" -d "{\"delete\":$s,\"token\":\"$token\"}" -s $host/users/$id
|
2023-05-01 14:00:17 +00:00
|
|
|
|