@nger/fk-upload 1.0.75 → 1.0.76

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.
@@ -43,11 +43,12 @@ let CheckUploadController = class CheckUploadController {
43
43
  // remove finish
44
44
  const list = await download.find({ where: { status: (0, typeorm_2.In)([2, 3]) } });
45
45
  const removes = [];
46
- [...list, ...largs].map(item => {
46
+ Promise.all([...list, ...largs].map(async (item) => {
47
47
  if ((0, fs_1.existsSync)(item.path)) {
48
- (0, fs_extra_1.unlink)(item.path);
48
+ await (0, fs_extra_1.unlink)(item.path);
49
+ removes.push(item.path);
49
50
  }
50
- });
51
+ }));
51
52
  return { msg: 'succes', removes };
52
53
  }
53
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.75",
3
+ "version": "1.0.76",
4
4
  "description": "",
5
5
  "main": "dist/core.js",
6
6
  "types": "dist/core.d.ts",