@digione/node-custom-api 0.2.0-alpha2 → 0.2.0-beta2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/stream.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digione/node-custom-api",
3
- "version": "0.2.0-alpha2",
3
+ "version": "0.2.0-beta2",
4
4
  "description": "Typescript node digione-api",
5
5
  "author": "Monchai Jirayupong <monchai.j@seven.co.th>",
6
6
  "license": "MIT",
package/utils/stream.js CHANGED
@@ -956,8 +956,8 @@ class StreamUtil {
956
956
  }
957
957
  let folder = yield fileUtil.createFolder(index, { parent_id: where_folder['parent_id'] });
958
958
  let where_file = { folder_id: folder['id'], is_hidden: "yes" };
959
- where_file = fileUtil.beforeFindFile(where_file, { tags, group });
960
- let query = yield file_1.FileModel.schema(ref, "_").findAll({ where: where_file, attributes: ['id', 'name'], raw: true });
959
+ let option_file = fileUtil.beforeFindFile(where_file, { tags, group, verify: true });
960
+ let query = yield file_1.FileModel.schema(ref, "_").findAll({ where: option_file.where, attributes: ['id', 'name'], raw: true });
961
961
  id_files = query.reduce((total, item) => Object.assign(total, { [item['name']]: item['id'] }), {});
962
962
  let input_files = [];
963
963
  yield Promise.all(fields.map(({ field_type, field_slug, field_data }) => tslib_1.__awaiter(this, void 0, void 0, function* () {