be less verbose when gathering

main
Yanick Champoux 2024-02-15 08:43:30 -05:00
parent f4e55be916
commit 8e241c6be3
1 changed files with 2 additions and 5 deletions

View File

@ -98,7 +98,6 @@ export async function update_user_games(db, username) {
}); });
for (let game of games) { for (let game of games) {
console.log(game.name);
const existing_game = game_present.get(username, game.bgg_id); const existing_game = game_present.get(username, game.bgg_id);
if (existing_game) { if (existing_game) {
if ( if (
@ -106,17 +105,15 @@ export async function update_user_games(db, username) {
(attr) => existing_game[attr] != game[attr], (attr) => existing_game[attr] != game[attr],
) )
) { ) {
console.log('updating game'); console.log(game.name, 'updating game');
update.run({ update.run({
...game, ...game,
updated_at, updated_at,
username, username,
}); });
} else {
console.log("didn't change");
} }
} else { } else {
console.log('new game!'); console.log(game.name, 'new game!');
insert.run({ insert.run({
username, username,
updated_at, updated_at,