1
0
api/tmp/card_add.zsh

21 lines
384 B
Bash
Raw Normal View History

2023-05-21 06:45:18 +00:00
#!/bin/zsh
echo id card cp
read
host=https://api.syui.ai
pass=`cat ~/.config/atr/api_card.json|jq -r .password`
if [ -z "$1" ];then
exit
fi
if [ -z "$2" ];then
exit
fi
if [ -z "$3" ];then
exit
fi
id=$1
card=$2
cp=$3
s="normal"
curl -X POST -H "Content-Type: application/json" -d "{\"owner\":$id,\"card\":$card,\"status\":\"$s\",\"cp\":$cp,\"password\":\"$pass\"}" -sL $host/cards