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
+14
View File
@@ -0,0 +1,14 @@
const admin = require("firebase-admin");
async function deleteFolder(path) {
try {
console.log(`Deleting folder: ${path}`);
const bucket = admin.storage().bucket();
await bucket.deleteFiles({ prefix: path, force: true });
console.log(`Folder ${path} deleted successfully`);
} catch (e) {
console.log(e);
}
}
exports.deleteFolder = deleteFolder;