This commit is contained in:
2024-02-08 15:32:27 +09:00
parent 1873c007d4
commit 0a3852bd3b
3 changed files with 3 additions and 3 deletions

View File

@ -1,27 +0,0 @@
#!/bin/zsh
case $OSTYPE in
darwin*)
alias date="/opt/homebrew/bin/gdate"
;;
esac
d=${0:a:h}
source $d/env
source $d/refresh.zsh
source $d/token.zsh
source $d/reply.zsh
source $d/notify.zsh
case $1 in
refresh|r)
refresh
;;
token|t)
token
;;
reply)
reply
;;
notify|n)
notify
;;
esac

View File

@ -5,7 +5,7 @@ function refresh(){
token
fi
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 >! $cfg.t
}

View File

@ -25,5 +25,5 @@ json="{
echo $json|jq .
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`
}