feat: add route for adding pastes

This commit is contained in:
Jef Roosens 2022-11-21 16:22:52 +01:00
parent a22a2e5cfa
commit 7f42d540b5
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
4 changed files with 51 additions and 14 deletions

View file

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