feat: salta los tickets bloqueados
This commit is contained in:
parent
1a74e84359
commit
f356188491
|
@ -98,7 +98,7 @@ module.exports = Self => {
|
|||
for (const ticketId of ticketsId) {
|
||||
try {
|
||||
const lockCode = await getLockCode(token, secondCookie, ticketId);
|
||||
if (lockCode == false) continue;
|
||||
if (!lockCode) throw new Error(`Can't get lock code`);
|
||||
let form = new FormData();
|
||||
form.append('__CSRFToken__', token);
|
||||
form.append('id', ticketId);
|
||||
|
@ -123,7 +123,7 @@ module.exports = Self => {
|
|||
} catch (e) {
|
||||
const err = new Error(`${ticketId} Ticket close failed: ${e.message}`);
|
||||
err.stack += e.stack;
|
||||
throw err;
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ module.exports = Self => {
|
|||
const body = await response.text();
|
||||
const json = JSON.parse(body);
|
||||
|
||||
return json.code || json.retry;
|
||||
return json.code || null;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue