From 866f06e505b32880568c66db24a4233468d3c3e8 Mon Sep 17 00:00:00 2001 From: nocci Date: Thu, 8 Jan 2026 15:47:59 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(helper):=20add=20screenshot=20?= =?UTF-8?q?helper=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - introduce a new screenshot helper function for path resolution - enhance code readability by organizing screenshot path management --- epic-claimer-new.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epic-claimer-new.js b/epic-claimer-new.js index b9943fd..349a640 100644 --- a/epic-claimer-new.js +++ b/epic-claimer-new.js @@ -20,6 +20,10 @@ const URL_CLAIM = 'https://store.epicgames.com/en-US/free-games'; const COOKIES_PATH = path.resolve(cfg.dir.browser, 'epic-cookies.json'); const BEARER_TOKEN_NAME = 'EPIC_BEARER_TOKEN'; +// Screenshot Helper Function +const screenshot = (...a) => path.resolve(cfg.dir.screenshots, 'epic-games', ...a); + + // Fetch Free Games from API const fetchFreeGamesAPI = async () => { const resp = await axios.get('https://store-site-backend-static-ipv4.ak.epicgames.com/freeGamesPromotions', {