Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
gausie committed Jun 18, 2024
1 parent 0ec7fb2 commit c53ab29
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions packages/excavator-web/etl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,12 @@ async function getPwd() {

async function deleteKmails(ids: number[]) {
const pwd = await getPwd();
const response = await f(
"https://www.kingdomofloathing.com/messages.php",
{
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: `the_action=delete&pwd=${pwd}&box=Inbox&${ids.map((id) => `sel${id}=on`).join("&")}`,
credentials: "include",
method: "POST",
},
);
const response = await f("https://www.kingdomofloathing.com/messages.php", {
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: `the_action=delete&pwd=${pwd}&box=Inbox&${ids.map((id) => `sel${id}=on`).join("&")}`,
credentials: "include",
method: "POST",
});
const text = await response.text();
return text.includes(`${ids.length} messages deleted.`);
}
Expand Down Expand Up @@ -170,7 +167,9 @@ async function main() {
}

const deleteSuccess = await deleteKmails(kmails.map((k) => Number(k.id)));
deleteSuccess ? console.log("Deleted kmails") : console.error("Failed to delete kmails");
deleteSuccess
? console.log("Deleted kmails")
: console.error("Failed to delete kmails");
}
}

Expand Down

0 comments on commit c53ab29

Please sign in to comment.