Remove calls to api in globalbeatlist

This commit is contained in:
baz 2024-02-16 17:34:08 +00:00
parent 328baba353
commit c1c63092ab
1 changed files with 1 additions and 3 deletions

View File

@ -18,9 +18,7 @@ module.exports = {
desc = 'No games beaten yet.';
} else {
for (let i = 0; i < beatenGamesDatabaseEntries.length; i++) {
const gameid = await checkGameStorageId(beatenGamesDatabaseEntries[i].gameId);
const res = await getGameJson(`where id = ${ gameid.igdb_id }; fields *;`);
const game = res[0];
const game = await checkGameStorageId(beatenGamesDatabaseEntries[i].gameId);
const userentry = await getUserFromId(beatenGamesDatabaseEntries[i].userId);
const date = beatenGamesDatabaseEntries[i].updatedAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/');
desc = desc.concat('**', date, '**: \t', game.name, ' \t*(', userentry.username, ')*\n');