feat: allow adding paste with predefined key
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Jef Roosens 2022-11-21 20:15:49 +01:00
parent 91bba2e9ff
commit b66c0f0e00
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
2 changed files with 29 additions and 2 deletions

View file

@ -14,5 +14,5 @@ elif [ "$1" = get ]; then
curl -is "$URL/$2" | sed -En 's/^[lL]ocation: (.*)/\1/p'
elif [ "$1" = paste ]; then
curl --data-binary @"$2" -XPOST -H "X-Api-Key: $API_KEY" "$URL/p/"
curl --data-binary @"$2" -XPOST -H "X-Api-Key: $API_KEY" "$URL/p/$3"
fi