This commit is contained in:
parent
05911bbc80
commit
a08f1d37b7
@ -45,10 +45,10 @@ async function run() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function wrapEvent(doc) {
|
function wrapEvent(doc) {
|
||||||
if (doc.screenshot_count) {
|
if (doc && doc.screenshot_count) {
|
||||||
doc.screenshots = [];
|
doc.screenshots = [];
|
||||||
for (let i = 1; i <= doc.screenshot_count ; i++) {
|
for (let i = 1; i <= doc.screenshot_count ; i++) {
|
||||||
minioClient.presignedUrl('GET', minioBucket, `${data.fullDocument.camera}/${data.fullDocument._id}/${i}.jpg`, 60 * 60, (err, presignedUrl) => {
|
minioClient.presignedUrl('GET', minioBucket, `${doc.camera}/${doc._id}/${i}.jpg`, 60 * 60, (err, presignedUrl) => {
|
||||||
if (err) { return console.log(err) };
|
if (err) { return console.log(err) };
|
||||||
doc.screenshots.push({ url: presignedUrl });
|
doc.screenshots.push({ url: presignedUrl });
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user