this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: parse link ID from plain text response in test

The create endpoint returns "Created link N: URL" for
plain text requests, not a bare numeric ID.

+3 -3
+3 -3
tests/api_test.sh
··· 78 78 -H "Content-Type: application/json" \ 79 79 -H "Accept: text/plain" \ 80 80 -d '{"user":"testdel","url":"http://delete-test.com"}') 81 - # Check if we got an ID (numeric) 82 - if [[ "$CREATE_OUT" =~ ^[0-9]+$ ]]; then 83 - DEL_ID=$CREATE_OUT 81 + # Parse ID from response (format: "Created link N: URL") 82 + if [[ "$CREATE_OUT" =~ Created\ link\ ([0-9]+) ]]; then 83 + DEL_ID=${BASH_REMATCH[1]} 84 84 # Delete it 85 85 DEL_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X DELETE -H "X-API-Key: test-admin-secret" "$BASE_URL/api/v1/links/$DEL_ID") 86 86 if [ "$DEL_STATUS" == "204" ]; then