feat(helper): add screenshot helper function
Some checks failed
build-and-push / lint (push) Failing after 7s
build-and-push / sonar (push) Has been skipped
build-and-push / docker (push) Has been skipped

- introduce a new screenshot helper function for path resolution
- enhance code readability by organizing screenshot path management
This commit is contained in:
nocci 2026-01-08 15:47:59 +00:00
parent 370e3db206
commit 866f06e505

View file

@ -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', {