diff options
| author | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-03 02:28:12 -0400 |
|---|---|---|
| committer | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-03 02:28:12 -0400 |
| commit | b8ae0749a6e7f85edda8a0926e003cd561e4d172 (patch) | |
| tree | cbf7e35a550c8133ea5fad257997ecb7c9370ed8 /app/node_modules/okview/index.js | |
| parent | 6fbccc554b2ab51f683718334338eae2b7b06200 (diff) | |
Separate schema and resource concepts
Also refactor a bit
Diffstat (limited to 'app/node_modules/okview/index.js')
| -rw-r--r-- | app/node_modules/okview/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/node_modules/okview/index.js b/app/node_modules/okview/index.js index a049901..b2a72e8 100644 --- a/app/node_modules/okview/index.js +++ b/app/node_modules/okview/index.js @@ -57,11 +57,11 @@ OKView.prototype.getTemplateData = function(options) { .then(function(results) { var meta = results.shift(); var normalized = results.reduce(function(data, result, i) { - var name = queries[i].name; + var type = queries[i].type; if (isarray(result)) { - data[pluralize(name)] = result; + data[pluralize(type)] = result; } else { - data[name] = result; + data[type] = result; } return data; }, {meta: meta}); |
