From 5dbfdff68237fc97a336f1694c8c756f6dd466ca Mon Sep 17 00:00:00 2001 From: Allan Nava Date: Fri, 12 May 2023 14:40:11 +0200 Subject: [PATCH] fix dynamodb --- src/db/dynamodb.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/db/dynamodb.ts b/src/db/dynamodb.ts index 9e5582f..6cfee49 100644 --- a/src/db/dynamodb.ts +++ b/src/db/dynamodb.ts @@ -280,9 +280,9 @@ class DbScheduleEvents implements IDbScheduleEventsAdapter { const filter = this.rangeToFilter(channelId, rangeOpts); const items = await this.db.scan(this.schedulesTableName, filter); let scheduleEvents: ScheduleEvent[] = []; - console.log(`getScheduleEventsByChannelId items ${JSON.stringify(items)}`); + //console.log(`getScheduleEventsByChannelId items ${JSON.stringify(items)}`); items.forEach(item => { - console.log(`getScheduleEventsByChannelId items forEach item=${JSON.stringify(item)}`); + //console.log(`getScheduleEventsByChannelId items forEach item=${JSON.stringify(item)}`); scheduleEvents.push(new ScheduleEvent({ id: item.id, channelId: item.channelId, @@ -294,6 +294,7 @@ class DbScheduleEvents implements IDbScheduleEventsAdapter { type: item.type, liveUrl: item.liveUrl, })); + console.log(`getScheduleEventsByChannelId items forEach item title: ${item.title} start_time=${parseInt(item.start_time, 10)} | end_time=${parseInt(item.end_time, 10)}`); }); const sortedScheduleEvents = scheduleEvents.sort((a, b) => a.start_time - b.start_time); return sortedScheduleEvents;