Skip to content

Commit

Permalink
Migrate faction last action over to API V2.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeKleineKobini committed Feb 24, 2025
1 parent ff0cbe2 commit 9bd401e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@

const userID = getUsername(row).id;
const member = members.find((m) => m.id === userID);
if (!member) return;
const hours = ((nowDate - member.last_action.timestamp * 1000) / TO_MILLIS.HOURS).dropDecimals();

const element = document.newElement({
Expand Down Expand Up @@ -95,7 +96,7 @@
await fetchData("tornv2", {
section: "faction",
...(isNaN(id) ? {} : { id }),
selections: ["basic"],
selections: ["members"],
silent: true,
succeedOnError: true,
})
Expand Down

0 comments on commit 9bd401e

Please sign in to comment.