We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6f6288b + eb8f2b5 commit 552dfefCopy full SHA for 552dfef
index.js
@@ -23,7 +23,11 @@ function applyCsvToArrayTransform(data, model) {
23
24
module.exports = function (options = {}) { // eslint-disable-line no-unused-vars
25
return function (hook) {
26
- hook.result.data = applyCsvToArrayTransform(hook.result.data, hook.service.Model);
+ if (hook.method === 'find') {
27
+ hook.result.data = applyCsvToArrayTransform(hook.result.data, hook.service.Model);
28
+ } else if (hook.method === 'get') {
29
+ hook.result = applyCsvToArrayTransform(hook.result, hook.service.Model);
30
+ }
31
return Promise.resolve(hook);
32
};
-};
33
+};
0 commit comments