This commit is contained in:
		| @@ -45,10 +45,10 @@ async function run() { | ||||
|     }); | ||||
|  | ||||
|     function wrapEvent(doc) { | ||||
|       if (doc.screenshot_count) { | ||||
|       if (doc && doc.screenshot_count) { | ||||
|         doc.screenshots = []; | ||||
|         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) }; | ||||
|             doc.screenshots.push({ url: presignedUrl }); | ||||
|           }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user