diff options
| author | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-10 22:37:33 -0400 |
|---|---|---|
| committer | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-11 01:38:43 -0400 |
| commit | 1eff07c9c2ca5b61a28a1037a586d25c3791d67b (patch) | |
| tree | 605a17b53152560a5dc4e9e68bdda1c9f439279e /app/index.js | |
| parent | fd0d777ee81219577ef9416fab7f985920c3ae29 (diff) | |
Add autoincrementing index to resources
Diffstat (limited to 'app/index.js')
| -rw-r--r-- | app/index.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/index.js b/app/index.js index fc38b0a..e462b48 100644 --- a/app/index.js +++ b/app/index.js @@ -122,6 +122,8 @@ OKCMS.prototype._createSchemas = function(schemaConfig) { schemaConfig = schemaConfig || {}; return Object.keys(schemaConfig).reduce(function(cache, key) { var spec = schemaConfig[key]; + // All resources have an autoincrementing index so we can order them suckas + spec.__index = {type: 'meta', autoincrement: true}; cache[key] = OKSchema(spec); return cache; }, {}); |
