From 0d52a1a2ebf74c250d5ba9d291b6c7f48a2f9c09 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 22 Mar 2026 00:05:37 -0500 Subject: [PATCH] Add tags parameter to tinyURLShortener for enhanced URL tracking --- js/share/urlShortener.js | 4 ++-- spacewalk-config.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/js/share/urlShortener.js b/js/share/urlShortener.js index 5346901..c192efd 100644 --- a/js/share/urlShortener.js +++ b/js/share/urlShortener.js @@ -21,7 +21,7 @@ * */ -function tinyURLShortener({endpoint, apiKey, domain}) { +function tinyURLShortener({endpoint, apiKey, domain, tags}) { endpoint = endpoint || "https://api.tinyurl.com/create"; @@ -35,7 +35,7 @@ function tinyURLShortener({endpoint, apiKey, domain}) { const response = await fetch(endpoint, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${apiKey}`}, - body: JSON.stringify({ url, domain: domain || 't.3dg.io' }) + body: JSON.stringify({ url, domain: domain || 't.3dg.io', tags: tags || ['spacewalk']}) }); if (response.ok) { diff --git a/spacewalk-config.js b/spacewalk-config.js index 2d5b815..27dbef3 100644 --- a/spacewalk-config.js +++ b/spacewalk-config.js @@ -28,7 +28,8 @@ const spacewalkConfig = provider: 'tinyURL', apiKey: process.env.TINYURL_API_KEY || 'YOUR_TINYURL_API_KEY', domain: 't.3dg.io', - endpoint: 'https://api.tinyurl.com/create' + endpoint: 'https://api.tinyurl.com/create', + tags: ['spacewalk'] } }