From 864183dbe15b6a7f6313780f2db989015ef72160 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 13 Aug 2022 20:43:40 +0300 Subject: [PATCH] Update export.js --- scripts/commands/database/export.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/commands/database/export.js b/scripts/commands/database/export.js index 675a848479..9ce347f7b9 100644 --- a/scripts/commands/database/export.js +++ b/scripts/commands/database/export.js @@ -13,7 +13,7 @@ async function main() { let streams = await db.streams.find({}) streams = _.sortBy(streams, 'channel') streams = streams.map(stream => { - const data = { + let data = { channel: stream.channel, url: stream.url, http_referrer: stream.http_referrer, @@ -29,6 +29,7 @@ async function main() { let updatedAt = now let found = api.streams.find({ url: stream.url }) if (found) { + data = JSON.parse(JSON.stringify(data)) normalized = _.omit(found, ['added_at', 'updated_at', 'checked_at']) if (_.isEqual(data, normalized)) { addedAt = found.added_at || now