From 72b18e42665cbbe4328a176aa79e6a22afff4b96 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 10 Aug 2021 21:35:27 +1200 Subject: [PATCH] Add `modifiedTime` to properties to apply during view count increase update. --- server/googleActions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/googleActions.js b/server/googleActions.js index ff5fd0662..320e6f752 100644 --- a/server/googleActions.js +++ b/server/googleActions.js @@ -358,8 +358,9 @@ GoogleActions = { await drive.files.update({ fileId : brew.googleId, - resource : { properties : { views : brew.views + 1, - lastViewed : new Date() } } + resource : { modifiedTime : brew.updatedAt, + properties : { views : brew.views + 1, + lastViewed : new Date() } } }) .catch((err)=>{ console.log('Error updating Google views');