Update database/export.js

This commit is contained in:
Aleksandr Statciuk 2022-02-13 10:29:11 +03:00
parent 9a95ff55a5
commit ce46e88939
3 changed files with 9 additions and 10 deletions

View file

@ -6,15 +6,14 @@ const PUBLIC_DIR = process.env.PUBLIC_DIR || '.gh-pages'
async function main() {
await db.streams.load()
let streams = await db.streams.find({})
streams = _.sortBy(streams, 'channel_id')
streams = _.sortBy(streams, 'channel')
streams = streams.map(stream => {
return {
channel: stream.channel,
title: stream.title,
url: stream.url,
http_referrer: stream.http_referrer,
user_agent: stream.user_agent,
is_online: stream.is_online,
status: stream.status,
width: stream.width,
height: stream.height,
bitrate: stream.bitrate