Skip to content

Commit

Permalink
logging fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pan261 committed Nov 17, 2021
1 parent 4072568 commit 0f94a15
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,22 @@ exports.watch = (projectID, folderID, credentials, interval) => {
})
.then(data => {
if (data === undefined) { // no new files changed, return
console.log("no new files modified since " + dateXSecondsAgo.toISOString());
return;
}

for (var index in data) {
// console.log(data[index]);
var displayName = data[index].attributes.displayName;
var lastModifiedTime = data[index].attributes.lastModifiedTime;
console.log(lastModifiedTime);
console.log(displayName + " was modified at " + lastModifiedTime);

// TODO: if item is not in db, add to db and then download

// TODO: if item is in db, check and compare lastModifiedTime

}
})
.catch(err => {
console.error(err);
console.log(err);
});
}

0 comments on commit 0f94a15

Please sign in to comment.