diff --git a/src/app.js b/src/app.js index 0ce997a..73baf28 100644 --- a/src/app.js +++ b/src/app.js @@ -55,7 +55,7 @@ const init = async () => { }; process.on('unhandledRejection', (err) => { - console.log(err); + console.info(err); process.exit(1); }); diff --git a/src/core/client.js b/src/core/client.js index a9fe6e0..4cd798b 100644 --- a/src/core/client.js +++ b/src/core/client.js @@ -16,4 +16,3 @@ client.connect() export const Database = client.db('story-podcast-app') - diff --git a/src/core/generator.js b/src/core/generator.js index 60660d3..4ba931d 100644 --- a/src/core/generator.js +++ b/src/core/generator.js @@ -110,7 +110,7 @@ export function buildPublicChapters(chapters) { adjustedChapters.push({ time: new Date(adjustedTimeInSeconds * 1000).toISOString().substr(11, 8), description: chapter.description, - timeInSeconds: chapter.timeInSeconds, + timeInSeconds: chapter.timeInSeconds - totalPrivateChaptersTime, }); } else { const nextChapterTime = chapters[index + 1]?.time.split(':').reduce((acc, time) => (60 * acc) + +time, 0);