diff options
author | bcattaneo <c@ttaneo.uy> | 2020-09-08 12:32:36 -0300 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2021-03-31 19:40:07 +0200 |
commit | 2cfba484161c6b9b712e1f0582d3bd5537302100 (patch) | |
tree | b6d1525cb6cf459b38613bc2618865324a7240c9 | |
parent | f99fc64d248e55a83a128f3283fa7fff012c4c11 (diff) | |
download | wgetpaste-2cfba484161c6b9b712e1f0582d3bd5537302100.tar.gz |
Add missing expiration to pinnwand JSON
-rwxr-xr-x | wgetpaste | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -289,8 +289,8 @@ REGEX_RAW_pinnwand='s|^\(https://bpa.st\)\(/.*\)$|\1/raw\2|' escape_description_pinnwand() { sed -e 's|"|\\"|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' <<< "$*"; } escape_input_pinnwand() { sed -e 's|\\|\\\\|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' -e 's|\t|\\t|g' -e 's|"|\\"|g' -e 's|$|\\n|' <<< "$*" | tr -d '\n'; } POST_pinnwand() { - local description="${2}" language="${3}" content="${6}" - echo "{\"expiry\": \"${DEFAULT_EXPIRATION_bpaste}\", \"files\": [ {\"name\": \"${description}\", \"lexer\": \"${language}\", \"content\": \"${content}\"} ] }" + local description="${2}" language="${3}" expiration="${4}" content="${6}" + echo "{\"expiry\": \"${expiration}\", \"files\": [ {\"name\": \"${description}\", \"lexer\": \"${language}\", \"content\": \"${content}\"} ] }" } # snippets REGEX_URL_snippets='s|.*"web_url":"\([^"]*\)".*|\1|p' |