be less verbose when gathering

This commit is contained in:
Yanick Champoux 2024-02-15 08:43:30 -05:00
parent f4e55be916
commit 8e241c6be3

View File

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