Fix transaction when processing local viewer
This commit is contained in:
parent
cdd838168d
commit
68d6e57870
|
@ -23,7 +23,7 @@ async function createOrUpdateLocalVideoViewer (watchAction: WatchActionObject, v
|
||||||
: null,
|
: null,
|
||||||
|
|
||||||
videoId: video.id
|
videoId: video.id
|
||||||
})
|
}, { transaction: t })
|
||||||
|
|
||||||
await LocalVideoViewerWatchSectionModel.bulkCreateSections({
|
await LocalVideoViewerWatchSectionModel.bulkCreateSections({
|
||||||
localVideoViewerId: localVideoViewer.id,
|
localVideoViewerId: localVideoViewer.id,
|
||||||
|
@ -31,7 +31,9 @@ async function createOrUpdateLocalVideoViewer (watchAction: WatchActionObject, v
|
||||||
watchSections: watchAction.watchSections.map(s => ({
|
watchSections: watchAction.watchSections.map(s => ({
|
||||||
start: s.startTimestamp,
|
start: s.startTimestamp,
|
||||||
end: s.endTimestamp
|
end: s.endTimestamp
|
||||||
}))
|
})),
|
||||||
|
|
||||||
|
transaction: t
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue