1
0
api/scpt/card_did_change.zsh
2024-02-21 09:16:45 +00:00

21 lines
380 B
Bash
Executable File

#!/bin/zsh
echo id
host=https://api.syui.ai
token=`cat ~/.config/atr/api_card.json|jq -r .token`
echo $token
pass=`cat ~/.config/atr/api_card.json|jq -r .pass`
if [ -z "$1" ];then
echo 1 : id
exit
fi
if [ -z "$2" ];then
echo 2 : did
exit
fi
id=$1
did=$2
id=$1
curl -X PATCH -H "Content-Type: application/json" -d "{\"did\":\"$did\",\"token\":\"$token\"}" -s $host/users/$id