@lacrous/omnicloud 0.2.23 → 0.2.24

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/dist/index.cjs CHANGED
@@ -2216,14 +2216,11 @@ var FolderService = class {
2216
2216
  );
2217
2217
  const restorableFileIds = restorableFiles.map((file) => file.id);
2218
2218
  if (restorableFolders.length > 0) {
2219
- await this.folders.updateMany(
2219
+ await this.folders.restoreSubtree(
2220
2220
  restorableFolders.map((folder) => folder.id),
2221
- { deletedAt: null, trashBatchId: null }
2221
+ restorableFileIds,
2222
+ { rootId: id, reparent: { parentId } }
2222
2223
  );
2223
- await this.folders.update(id, { parentId });
2224
- }
2225
- if (restorableFileIds.length > 0) {
2226
- await this.files.updateMany(restorableFileIds, { deletedAt: null, trashBatchId: null });
2227
2224
  }
2228
2225
  await this.activity.record({
2229
2226
  userId,