Skip to content

Commit 2cfba48

Browse files
bcattaneoCogitri
authored andcommitted
Add missing expiration to pinnwand JSON
1 parent f99fc64 commit 2cfba48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wgetpaste

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ REGEX_RAW_pinnwand='s|^\(https://bpa.st\)\(/.*\)$|\1/raw\2|'
289289
escape_description_pinnwand() { sed -e 's|"|\\"|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' <<< "$*"; }
290290
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'; }
291291
POST_pinnwand() {
292-
local description="${2}" language="${3}" content="${6}"
293-
echo "{\"expiry\": \"${DEFAULT_EXPIRATION_bpaste}\", \"files\": [ {\"name\": \"${description}\", \"lexer\": \"${language}\", \"content\": \"${content}\"} ] }"
292+
local description="${2}" language="${3}" expiration="${4}" content="${6}"
293+
echo "{\"expiry\": \"${expiration}\", \"files\": [ {\"name\": \"${description}\", \"lexer\": \"${language}\", \"content\": \"${content}\"} ] }"
294294
}
295295
# snippets
296296
REGEX_URL_snippets='s|.*"web_url":"\([^"]*\)".*|\1|p'

0 commit comments

Comments
 (0)