This commit is contained in:
matteo
2019-03-04 11:45:06 +01:00
parent a26b7fe72c
commit 82f3a01356
2 changed files with 15 additions and 26 deletions
+2 -2
View File
@@ -67,7 +67,7 @@ low(new FileAsync(__dirname + '/db.json')) // production
if (row.value()) {
let tmpA = videos.filter(x => x.id !== req.query.id).map(x => {
return {
"videoId": x.id,
"videoID": x.id,
"timesWatched": x.timesWatched,
"prevalentReason": x.reason.sort((a, b) => a.timesWatched - b.timesWatched).reverse()[0].reason,
"lastSelected": x.lastWatched
@@ -83,7 +83,7 @@ low(new FileAsync(__dirname + '/db.json')) // production
else {
let tmpA = videos.map(x => {
return {
"videoId": x.id,
"videoID": x.id,
"timesWatched": x.timesWatched,
"prevalentReason": x.reason.sort((a, b) => a.timesWatched - b.timesWatched).reverse()[0].reason,
"lastSelected": x.lastWatched