summaryrefslogtreecommitdiff
path: root/app/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/index.js')
-rw-r--r--app/index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/index.js b/app/index.js
index 419adfc..7860f76 100644
--- a/app/index.js
+++ b/app/index.js
@@ -87,7 +87,6 @@ function OKCMS(options) {
this._createResources(resourceConfig, db, schemas);
var errorHandler = createErrorHandlerProducer(
templateProvider, adminTemplateProvider, debug);
-
// Create view instances from config
var views = this._views =
this._createViews(viewConfig, db, meta, resourceCache, templateProvider,
@@ -141,7 +140,7 @@ OKCMS.prototype._createResources = function(resourceConfig, db, schemaCache) {
var type = config.type;
var schema = schemaCache[type];
if (!schema)
- throw new Error('Resource config references nonexistent schema');
+ throw new Error('Resource config references nonexistent schema ' + type);
var resource = OKResource({
type: type,
db: db,
@@ -244,7 +243,8 @@ OKCMS.prototype._createQueries = function(queryConfig, resourceCache) {
var query = config.query || '*';
return new OKQuery({
resource: resource,
- query: query
+ query: query,
+ as: config.as,
});
});
};