summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/index.js2
-rw-r--r--app/node_modules/okschema/index.js5
2 files changed, 7 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;
}, {});
diff --git a/app/node_modules/okschema/index.js b/app/node_modules/okschema/index.js
index 4633e7a..d53ed7b 100644
--- a/app/node_modules/okschema/index.js
+++ b/app/node_modules/okschema/index.js
@@ -56,6 +56,11 @@ var types = {
}];
}
}
+ },
+ // Special type for resource meta information
+ 'meta': {
+ parent: 'string',
+ assertValid: function(spec, value) {}
}
}