1
0
This commit is contained in:
syui 2024-02-08 15:32:27 +09:00
parent 1873c007d4
commit 0a3852bd3b
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
3 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ case $OSTYPE in
alias date="/opt/homebrew/bin/gdate" alias date="/opt/homebrew/bin/gdate"
;; ;;
esac esac
d=${0:a:h} d=${0:a:h}/scpt
source $d/env source $d/env
source $d/refresh.zsh source $d/refresh.zsh
source $d/token.zsh source $d/token.zsh

View File

@ -5,7 +5,7 @@ function refresh(){
token token
fi fi
url=https://$host/xrpc/com.atproto.server.refreshSession url=https://$host/xrpc/com.atproto.server.refreshSession
j=`curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $refresh" $url` j=`curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $refresh" $url`
echo $j echo $j
echo $j >! $cfg.t echo $j >! $cfg.t
} }

View File

@ -25,5 +25,5 @@ json="{
echo $json|jq . echo $json|jq .
url=https://$host/xrpc/com.atproto.repo.createRecord url=https://$host/xrpc/com.atproto.repo.createRecord
j=`curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d "$json" $url` j=`curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d "$json" $url`
} }