fix list and improve cloud functions

This commit is contained in:
Thomas Demirdjian
2025-10-01 15:29:24 +02:00
parent 2908afc259
commit 0bc186413b
18 changed files with 382 additions and 299 deletions
+3 -3
View File
@@ -35,7 +35,7 @@ exports.generateVideoThumbnail = onObjectFinalized(
// Use unique folder under /tmp to avoid name collisions
const tmpDir = path.join(
os.tmpdir(),
`thumb-${Date.now()}-${Math.round(Math.random() * 1000)}`
`thumb-${Date.now()}-${Math.round(Math.random() * 1000)}`,
);
const baseName = path.basename(objectName);
const dirName = path.posix.dirname(objectName);
@@ -96,7 +96,7 @@ exports.generateVideoThumbnail = onObjectFinalized(
thumbnailUrl,
updatedAt: admin.firestore.FieldValue.serverTimestamp(),
},
{ merge: true }
{ merge: true },
);
}
@@ -115,5 +115,5 @@ exports.generateVideoThumbnail = onObjectFinalized(
} finally {
await fs.rm(tmpDir, { recursive: true, force: true });
}
}
},
);