be less verbose when gathering
This commit is contained in:
parent
f4e55be916
commit
8e241c6be3
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user