@digione/node-custom-api 0.1.7-beta1 → 0.1.7
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 +1 -1
- package/utils/stream.js +1 -1
package/package.json
CHANGED
package/utils/stream.js
CHANGED
|
@@ -1742,7 +1742,7 @@ class StreamUtil {
|
|
|
1742
1742
|
getValidator(streams, { schema = {}, input = {}, req = {}, isNew = false, lang = [], required = true, stripUnknown = false } = {}) {
|
|
1743
1743
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1744
1744
|
let field_lang = [];
|
|
1745
|
-
let file =
|
|
1745
|
+
let file = (req.file ? [req.file] : [].concat(req.files || [])).reduce((total, item) => Object.assign(total, { [item['fieldname']]: item }), {});
|
|
1746
1746
|
streams.forEach(({ field_type, field_slug, is_required, is_lang, field_data, data }) => {
|
|
1747
1747
|
let field;
|
|
1748
1748
|
field_data = field_data || {};
|