fix
This commit is contained in:
parent
c119efcaed
commit
dc7df561c3
@ -195,6 +195,7 @@ function ai_create_user() {
|
|||||||
did=$did_yui
|
did=$did_yui
|
||||||
handle=$handle_yui
|
handle=$handle_yui
|
||||||
pds=bsky.social
|
pds=bsky.social
|
||||||
|
version=2
|
||||||
#rkey=syui
|
#rkey=syui
|
||||||
#img=https://cdn.bsky.app/img/feed_thumbnail/plain/did:plc:4hqjfn7m6n5hno3doamuhgef/bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy@jpeg
|
#img=https://cdn.bsky.app/img/feed_thumbnail/plain/did:plc:4hqjfn7m6n5hno3doamuhgef/bafkreie34pjuc6coenzcdwrgrh4fbacq7bkhsz263g5vpbsqxwaz37kkwy@jpeg
|
||||||
req=com.atproto.repo.putRecord
|
req=com.atproto.repo.putRecord
|
||||||
@ -264,6 +265,12 @@ function ai_create_user() {
|
|||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|
||||||
|
json_item="
|
||||||
|
\"coin\": { \"id\": 0, \"count\": 0 },
|
||||||
|
\"card\": { \"id\": 0, \"count\": 0 },
|
||||||
|
\"weapon\": { \"id\": 0, \"count\": 0 }
|
||||||
|
"
|
||||||
|
|
||||||
json="
|
json="
|
||||||
{
|
{
|
||||||
\"repo\": \"$handle_yui\",
|
\"repo\": \"$handle_yui\",
|
||||||
@ -271,7 +278,7 @@ function ai_create_user() {
|
|||||||
\"collection\": \"$col\",
|
\"collection\": \"$col\",
|
||||||
\"rkey\": \"$rkey\",
|
\"rkey\": \"$rkey\",
|
||||||
\"record\": {
|
\"record\": {
|
||||||
\"version\": 2,
|
\"version\": $version,
|
||||||
\"did\": \"$did\",
|
\"did\": \"$did\",
|
||||||
\"handle\": \"$handle\",
|
\"handle\": \"$handle\",
|
||||||
\"player\": {
|
\"player\": {
|
||||||
@ -283,16 +290,24 @@ function ai_create_user() {
|
|||||||
\"character\": {
|
\"character\": {
|
||||||
$json
|
$json
|
||||||
},
|
},
|
||||||
|
\"item\": {
|
||||||
|
$json_item
|
||||||
|
},
|
||||||
\"createdAt\": \"${created}\",
|
\"createdAt\": \"${created}\",
|
||||||
\"updatedAt\": \"${created}\"
|
\"updatedAt\": \"${created}\"
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|
||||||
if echo $json|jq . ;then
|
if echo $json|jq . ;then
|
||||||
echo y
|
echo y
|
||||||
read y
|
read y
|
||||||
if [ "y" = "$y" ];then
|
if [ "y" = "$y" ];then
|
||||||
curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d $json $url
|
t=`curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d $json $url`
|
||||||
|
echo $t|jq .
|
||||||
|
f=~/ai/ue/json/v${version}_${rkey}.json
|
||||||
|
if [ -f $f ];then
|
||||||
|
echo $t|jq . >! $f
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user