Fix lint: guard browser globals and normalize indentation
All checks were successful
build-and-push / lint (push) Successful in 4s
build-and-push / sonar (push) Successful in 12s
build-and-push / docker (push) Successful in 1m12s

This commit is contained in:
nocci 2025-12-30 16:47:46 +00:00
parent 7ffc454e47
commit a477bb3327
2 changed files with 9 additions and 9 deletions

View file

@ -527,12 +527,12 @@ try {
} else if (reason == 'code_not_found') {
redeem_action = 'redeem (not found)';
console.error(' Code was not found!');
} else { // unknown state; keep info log for later analysis
redeem_action = 'redeemed?';
console.debug(` Response 1: ${r1t}`);
const r2 = page2.waitForResponse(r => r.request().method() == 'POST' && r.url().startsWith('https://redeem.gog.com/'));
await page2.click('[type="submit"]'); // click Redeem
const r2t = await (await r2).text();
} else { // unknown state; keep info log for later analysis
redeem_action = 'redeemed?';
console.debug(` Response 1: ${r1t}`);
const r2 = page2.waitForResponse(r => r.request().method() == 'POST' && r.url().startsWith('https://redeem.gog.com/'));
await page2.click('[type="submit"]'); // click Redeem
const r2t = await (await r2).text();
const reason2 = JSON.parse(r2t).reason;
if (r2t == '{}') {
redeem_action = 'redeemed';
@ -609,8 +609,8 @@ try {
} else {
notify_game.status = `claimed on ${store}`;
db.data[user][title].status = 'claimed';
}
await page.screenshot({ path: screenshot('external', `${filenamify(title)}.png`), fullPage: true });
}
await page.screenshot({ path: screenshot('external', `${filenamify(title)}.png`), fullPage: true });
}
}
await page.goto(URL_CLAIM, { waitUntil: 'domcontentloaded' });