document-drive 1.0.0-alpha.29 → 1.0.0-alpha.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-drive",
3
- "version": "1.0.0-alpha.29",
3
+ "version": "1.0.0-alpha.30",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "module": "./src/index.ts",
@@ -359,12 +359,11 @@ export class PrismaStorage implements IDriveStorage {
359
359
  }
360
360
 
361
361
  async deleteDrive(id: string) {
362
- const docs = await this.getDocuments(id);
363
- await Promise.all(
364
- docs.map(async doc => {
365
- return this.deleteDocument(id, doc);
366
- })
367
- );
362
+ await this.db.document.deleteMany({
363
+ where: {
364
+ driveId: id
365
+ }
366
+ });
368
367
  await this.deleteDocument('drives', id);
369
368
  }
370
369
  }