Browse Source

Fix paste script for v1 API.

master
Brett Bohnenkamper 4 years ago
parent
commit
057e16a733
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Paste/paste.sh

+ 2
- 2
Paste/paste.sh View File

@@ -74,7 +74,7 @@ else
fi

if [[ -n "${input}" ]]; then
output=$(curl --silent --data "${querystring}" --data-urlencode "code=${input}" https://api.teknik.io/paste)
output=$(curl --silent --data "${querystring}" --data-urlencode "code=${input}" https://api.teknik.io/v1/Paste)
pasteid=$(grep -Eo '"id":[0-9]+' <<< "${output}" | sed 's/\\//g')
pasteid="${pasteid##\"id\":}"
if [[ -n "${pasteid}" ]]; then
@@ -91,4 +91,4 @@ if [[ -n "${input}" ]]; then
else
printf "Error! Nothing found on standard input. Did you submit anything to paste?"
exit 1
fi
fi

Loading…
Cancel
Save